12890
|
1 |
"{ Package: 'stx:libbasic' }"
|
|
2 |
|
19286
|
3 |
"{ NameSpace: Smalltalk }"
|
|
4 |
|
12890
|
5 |
Object subclass:#OSProcess
|
21182
|
6 |
instanceVariableNames:'pid command environment directory inStream outStream errorStream
|
|
7 |
auxStream showWindow lineWise newPgrp exitStatus finishSema
|
21206
|
8 |
shufflerProcesses streamsToClose terminateActionBlock'
|
12890
|
9 |
classVariableNames:''
|
|
10 |
poolDictionaries:''
|
|
11 |
category:'System-Support'
|
|
12 |
!
|
|
13 |
|
|
14 |
!OSProcess class methodsFor:'documentation'!
|
|
15 |
|
|
16 |
documentation
|
|
17 |
"
|
21182
|
18 |
Instances of OSProcess represent operating system processes thatr can be executed.
|
12890
|
19 |
(as opposed to Smalltalk processes).
|
|
20 |
|
|
21 |
[author:]
|
|
22 |
Stefan Vogel (stefan@zwerg)
|
|
23 |
|
|
24 |
[instance variables:]
|
|
25 |
pid SmallInteger the process id
|
21182
|
26 |
command String the command line of the running command.
|
12890
|
27 |
|
|
28 |
[class variables:]
|
|
29 |
|
|
30 |
[see also:]
|
|
31 |
Process
|
|
32 |
|
|
33 |
"
|
21181
|
34 |
!
|
|
35 |
|
|
36 |
examples
|
|
37 |
"
|
|
38 |
|outStream|
|
|
39 |
|
|
40 |
outStream := '' writeStream.
|
|
41 |
|
|
42 |
self new
|
21182
|
43 |
command:'ls -l';
|
21181
|
44 |
inStream:'abc' readStream;
|
|
45 |
outStream:outStream;
|
|
46 |
lineWise:true;
|
|
47 |
execute.
|
|
48 |
|
|
49 |
outStream contents
|
|
50 |
"
|
21184
|
51 |
|
|
52 |
"
|
|
53 |
|outStream|
|
|
54 |
|
|
55 |
outStream := '' writeStream.
|
|
56 |
|
|
57 |
self new
|
|
58 |
command:'ls -l; sleep 10; echo =================================; echo hallo after 10s; echo >&2 +++++++++++++++++++++; cat >&2';
|
|
59 |
inStream:'abc' readStream;
|
|
60 |
outStream:outStream;
|
|
61 |
errorStream:outStream;
|
|
62 |
startProcess.
|
|
63 |
|
|
64 |
outStream inspect
|
|
65 |
"
|
|
66 |
|
|
67 |
"
|
|
68 |
|outStream|
|
|
69 |
|
|
70 |
outStream := '' writeStream.
|
|
71 |
|
|
72 |
self new
|
|
73 |
command:'ls -l & ls -l >&2';
|
|
74 |
inStream:'abc' readStream;
|
|
75 |
outStream:outStream;
|
|
76 |
errorStream:outStream;
|
|
77 |
startProcess.
|
|
78 |
|
|
79 |
outStream inspect
|
|
80 |
"
|
21181
|
81 |
! !
|
|
82 |
|
|
83 |
!OSProcess class methodsFor:'instance creation'!
|
|
84 |
|
|
85 |
new
|
|
86 |
"return an initialized instance"
|
|
87 |
|
|
88 |
^ self basicNew initialize.
|
12890
|
89 |
! !
|
|
90 |
|
21172
|
91 |
!OSProcess class methodsFor:'initialize'!
|
|
92 |
|
|
93 |
initialize
|
|
94 |
"Backward compatibility"
|
|
95 |
Win32Process := self.
|
|
96 |
! !
|
|
97 |
|
12890
|
98 |
!OSProcess methodsFor:'accessing'!
|
|
99 |
|
21181
|
100 |
auxStream
|
|
101 |
^ auxStream
|
|
102 |
!
|
|
103 |
|
|
104 |
auxStream:something
|
21208
|
105 |
"set an auxilliary input stream that will be available to the command as
|
|
106 |
file descriptor 3"
|
|
107 |
|
21181
|
108 |
auxStream := something.
|
|
109 |
!
|
|
110 |
|
21172
|
111 |
command
|
|
112 |
"return the value of the instance variable 'command' (automatically generated)"
|
|
113 |
|
|
114 |
^ command
|
|
115 |
|
|
116 |
"Created: / 10.11.1998 / 21:27:07 / cg"
|
|
117 |
!
|
|
118 |
|
21208
|
119 |
command:aStringOrArray
|
|
120 |
"set the command to be executed.
|
|
121 |
If aStringOrArray is a String, the commandString is passed to a shell for execution
|
|
122 |
- see the description of 'sh -c' in your UNIX manual ('cmd.exe' in your Windows manual).
|
|
123 |
If aCommandString is an Array, the first element is the command to be executed,
|
|
124 |
and the other elements are the arguments to the command. No shell is invoked in this case."
|
21172
|
125 |
|
21208
|
126 |
command := aStringOrArray.
|
21172
|
127 |
!
|
|
128 |
|
|
129 |
directory
|
|
130 |
"return the value of the instance variable 'directory' (automatically generated)"
|
|
131 |
|
|
132 |
^ directory
|
|
133 |
|
|
134 |
"Created: / 10.11.1998 / 21:21:52 / cg"
|
|
135 |
!
|
|
136 |
|
21208
|
137 |
directory:aString
|
|
138 |
"set the directory that will be set as the current directory of the command to be executed"
|
21172
|
139 |
|
21208
|
140 |
directory := aString.
|
21172
|
141 |
!
|
|
142 |
|
|
143 |
environment
|
|
144 |
"return the value of the instance variable 'environment' (automatically generated)"
|
|
145 |
|
|
146 |
^ environment
|
|
147 |
|
|
148 |
"Created: / 10.11.1998 / 21:26:34 / cg"
|
|
149 |
!
|
|
150 |
|
21208
|
151 |
environment:aDictionary
|
|
152 |
"set the environment variables of the command to be executed"
|
21172
|
153 |
|
21208
|
154 |
environment := aDictionary.
|
21172
|
155 |
!
|
|
156 |
|
|
157 |
errorStream
|
|
158 |
"return the value of the instance variable 'errorStream' (automatically generated)"
|
|
159 |
|
|
160 |
^ errorStream
|
|
161 |
|
|
162 |
"Created: / 10.11.1998 / 21:26:34 / cg"
|
12890
|
163 |
!
|
|
164 |
|
21208
|
165 |
errorStream:aStream
|
|
166 |
"set the stream where the stderr output of the command is directed to"
|
21172
|
167 |
|
21208
|
168 |
errorStream := aStream.
|
21172
|
169 |
!
|
|
170 |
|
|
171 |
exitStatus
|
21208
|
172 |
"answer the exit status of the command or nil, if the command has not yet been finished"
|
21172
|
173 |
|
|
174 |
^ exitStatus
|
|
175 |
!
|
|
176 |
|
|
177 |
exitStatus:something
|
|
178 |
"set the value of the instance variable 'exitStatus' (automatically generated)"
|
|
179 |
|
|
180 |
exitStatus := something.
|
|
181 |
|
|
182 |
"Created: / 10.11.1998 / 21:24:55 / cg"
|
|
183 |
!
|
|
184 |
|
|
185 |
finishSema
|
21184
|
186 |
"wait on this semaphore if yo want to wait until the os process has finished.
|
|
187 |
There may be multiple waiters, so it is a good idea to do a #waitUncounted"
|
21172
|
188 |
|
|
189 |
^ finishSema
|
|
190 |
!
|
|
191 |
|
|
192 |
inStream
|
|
193 |
"return the value of the instance variable 'inStream' (automatically generated)"
|
|
194 |
|
|
195 |
^ inStream
|
|
196 |
|
|
197 |
"Created: / 10.11.1998 / 21:26:34 / cg"
|
|
198 |
!
|
|
199 |
|
21208
|
200 |
inStream:aStream
|
|
201 |
"set the stream where the stdin input of the command is read from"
|
21172
|
202 |
|
21208
|
203 |
inStream := aStream.
|
21172
|
204 |
!
|
|
205 |
|
21181
|
206 |
lineWise
|
|
207 |
^ lineWise
|
|
208 |
!
|
|
209 |
|
21208
|
210 |
lineWise:aBoolean
|
21209
|
211 |
"When setting to true, read linewise from the command's output and error.
|
|
212 |
This is a bit slower than lineWise = false.
|
21208
|
213 |
|
|
214 |
You may use it also when streaming to e.g. Transcript"
|
|
215 |
|
|
216 |
lineWise := aBoolean.
|
21181
|
217 |
!
|
|
218 |
|
21182
|
219 |
newPgrp
|
|
220 |
^ newPgrp
|
|
221 |
!
|
|
222 |
|
21208
|
223 |
newPgrp:aBoolean
|
|
224 |
"if aBoolean is true, a new process group will be created for the command and its subprocesses"
|
|
225 |
|
|
226 |
newPgrp := aBoolean.
|
21182
|
227 |
!
|
|
228 |
|
21172
|
229 |
outStream
|
|
230 |
"return the value of the instance variable 'outStream' (automatically generated)"
|
|
231 |
|
|
232 |
^ outStream
|
|
233 |
|
|
234 |
"Created: / 10.11.1998 / 21:26:34 / cg"
|
|
235 |
!
|
|
236 |
|
21208
|
237 |
outStream:aStream
|
|
238 |
"set the stream where the stdout output of the command is directed to"
|
21172
|
239 |
|
21208
|
240 |
outStream := aStream.
|
12890
|
241 |
!
|
|
242 |
|
|
243 |
pid
|
21208
|
244 |
"answer the pid of the process the command is running in or nil, if the command has not yet been started."
|
|
245 |
|
12890
|
246 |
^ pid
|
|
247 |
!
|
|
248 |
|
|
249 |
pid:something
|
|
250 |
pid := something.
|
21181
|
251 |
!
|
|
252 |
|
|
253 |
showWindow
|
|
254 |
^ showWindow
|
|
255 |
!
|
|
256 |
|
21208
|
257 |
showWindow:aBooleanOrNil
|
|
258 |
"This parameter is ignored on Unix systems.
|
|
259 |
|
|
260 |
You can control (have to - sigh) if a window should be shown for the command or not.
|
|
261 |
This is the OS's H_SHOWWINDOW argument.
|
|
262 |
If you pass nil as showWindow-argument, the OS's default is used for the particular
|
|
263 |
command, which is correct most of the time: i.e. a notepad will open its window, other (non-UI)
|
|
264 |
executables will not.
|
|
265 |
However, some command-line executables show a window, even if they should not.
|
|
266 |
(and also, there seems to be an inconsistency between windows7 and newer windows: in newer,
|
|
267 |
a shell command opens a cmd-window, whereas in windows7 it did not)
|
|
268 |
In this case, pass an explicit false argument to suppress it."
|
|
269 |
|
|
270 |
showWindow := aBooleanOrNil.
|
21206
|
271 |
!
|
|
272 |
|
|
273 |
terminateActionBlock
|
|
274 |
^ terminateActionBlock
|
|
275 |
!
|
|
276 |
|
21208
|
277 |
terminateActionBlock:aBlock
|
|
278 |
"set the block that will be executed when the command has been finished or terminated."
|
|
279 |
|
|
280 |
terminateActionBlock := aBlock.
|
12890
|
281 |
! !
|
|
282 |
|
21181
|
283 |
!OSProcess methodsFor:'initialization'!
|
|
284 |
|
|
285 |
initialize
|
|
286 |
"Invoked when a new instance is created."
|
|
287 |
|
|
288 |
showWindow := false. "/ for backward compatibility
|
21183
|
289 |
lineWise := false.
|
|
290 |
newPgrp := true.
|
21181
|
291 |
! !
|
|
292 |
|
13313
|
293 |
!OSProcess methodsFor:'printing'!
|
|
294 |
|
|
295 |
printOn:aStream
|
|
296 |
aStream
|
|
297 |
nextPutAll:self className;
|
|
298 |
nextPut:$(.
|
|
299 |
pid printOn:aStream.
|
|
300 |
aStream space.
|
21172
|
301 |
command printOn:aStream.
|
13313
|
302 |
aStream nextPut:$)
|
|
303 |
! !
|
|
304 |
|
21181
|
305 |
!OSProcess methodsFor:'private'!
|
|
306 |
|
|
307 |
setupShufflerForInput:aStream
|
21182
|
308 |
"if aStream is an internal Stream, set up a pipe for the command input.
|
|
309 |
Start a process that shuffles tha data fron the internal stream into the pipe
|
|
310 |
(and into the command's input)."
|
|
311 |
|
21181
|
312 |
|pipe externalStream shuffledStream shufflerProcess|
|
|
313 |
|
|
314 |
(aStream isNil or:[aStream isExternalStream]) ifTrue:[
|
|
315 |
^ aStream.
|
|
316 |
].
|
|
317 |
|
|
318 |
pipe := NonPositionableExternalStream makePipe.
|
|
319 |
externalStream := pipe at:1.
|
|
320 |
shuffledStream := pipe at:2.
|
|
321 |
lineWise ifFalse:[
|
|
322 |
shuffledStream blocking:false.
|
|
323 |
].
|
|
324 |
aStream isBinary ifTrue:[
|
|
325 |
shuffledStream binary.
|
|
326 |
].
|
|
327 |
|
|
328 |
"/ start a reader process, shuffling data from the given
|
|
329 |
"/ inStream to the pipe (which is connected to the commands input)
|
21182
|
330 |
shufflerProcess := [
|
21181
|
331 |
[
|
21332
|
332 |
lineWise ifTrue:[
|
|
333 |
"shuffle until end-of-input"
|
|
334 |
[aStream atEnd] whileFalse:[
|
|
335 |
|data|
|
21184
|
336 |
|
21332
|
337 |
data := aStream nextLine.
|
|
338 |
data notNil ifTrue:[
|
|
339 |
shuffledStream nextPutLine:data.
|
|
340 |
shuffledStream flush.
|
21184
|
341 |
].
|
|
342 |
].
|
21332
|
343 |
] ifFalse:[
|
|
344 |
aStream copyToEndInto:shuffledStream.
|
21184
|
345 |
].
|
21332
|
346 |
] on:WriteError do:[:ex|
|
|
347 |
"ignore"
|
21181
|
348 |
] ensure:[
|
|
349 |
shuffledStream close.
|
|
350 |
]
|
|
351 |
] newProcess
|
|
352 |
name:'OSProcess input shuffler';
|
|
353 |
"/ beSystemProcess;
|
|
354 |
resume.
|
|
355 |
|
|
356 |
shufflerProcesses add:shufflerProcess.
|
21184
|
357 |
streamsToClose add:externalStream.
|
|
358 |
|
21181
|
359 |
^ externalStream
|
21332
|
360 |
|
|
361 |
"Modified: / 31-01-2017 / 16:50:39 / stefan"
|
21181
|
362 |
!
|
|
363 |
|
|
364 |
setupShufflerForOutput:aStream
|
21182
|
365 |
"if aStream is an internal Stream, set up a pipe for the command output.
|
|
366 |
Start a process that shuffles the data fron the pipe into the internal stream."
|
|
367 |
|
21181
|
368 |
|pipe externalStream shuffledStream shufflerProcess|
|
|
369 |
|
|
370 |
(aStream isNil or:[aStream isExternalStream]) ifTrue:[
|
|
371 |
^ aStream.
|
|
372 |
].
|
|
373 |
|
|
374 |
pipe := NonPositionableExternalStream makePipe.
|
|
375 |
externalStream := pipe at:2.
|
|
376 |
shuffledStream := pipe at:1.
|
|
377 |
aStream isBinary ifTrue:[
|
|
378 |
shuffledStream binary.
|
|
379 |
].
|
|
380 |
|
21182
|
381 |
shufflerProcess := [
|
21332
|
382 |
[
|
|
383 |
"shuffle until the pipe closes"
|
|
384 |
lineWise ifTrue:[
|
|
385 |
[shuffledStream atEnd] whileFalse:[
|
|
386 |
|data|
|
21184
|
387 |
|
21332
|
388 |
data := shuffledStream nextLine.
|
|
389 |
data notNil ifTrue:[
|
|
390 |
aStream nextPutLine:data
|
21184
|
391 |
].
|
|
392 |
].
|
21332
|
393 |
] ifFalse:[
|
|
394 |
shuffledStream copyToEndInto:aStream.
|
21181
|
395 |
].
|
21332
|
396 |
] on:WriteError do:[:ex |
|
|
397 |
"ignore"
|
|
398 |
] ensure:[
|
|
399 |
shuffledStream close.
|
21181
|
400 |
].
|
|
401 |
] newProcess
|
|
402 |
priority:(Processor userSchedulingPriority "+ 1");
|
|
403 |
name:'OSProcess output shuffler';
|
|
404 |
"/ beSystemProcess;
|
|
405 |
resume.
|
|
406 |
|
21223
|
407 |
shufflerProcesses add:shufflerProcess.
|
21184
|
408 |
streamsToClose add:externalStream.
|
|
409 |
|
21181
|
410 |
^ externalStream
|
21332
|
411 |
|
|
412 |
"Modified: / 31-01-2017 / 16:57:25 / stefan"
|
21181
|
413 |
! !
|
|
414 |
|
12890
|
415 |
!OSProcess methodsFor:'queries'!
|
|
416 |
|
21208
|
417 |
finishedWithSuccess
|
|
418 |
^ exitStatus notNil and:[exitStatus success].
|
|
419 |
!
|
|
420 |
|
12890
|
421 |
isAlive
|
|
422 |
"answer true, if the process is still alive"
|
|
423 |
|
21205
|
424 |
^ pid notNil and:[exitStatus isNil]
|
12890
|
425 |
!
|
|
426 |
|
|
427 |
isDead
|
|
428 |
"answer true, if the process is no longer alive"
|
|
429 |
|
|
430 |
^ self isAlive not
|
|
431 |
! !
|
|
432 |
|
21172
|
433 |
!OSProcess methodsFor:'starting'!
|
|
434 |
|
21181
|
435 |
execute
|
21184
|
436 |
"execute the command.
|
|
437 |
Wait until is is finished.
|
|
438 |
Abort the execution if I am interrupted.
|
|
439 |
Answer true if the terminated succesfully,
|
|
440 |
false if it could not be started or terminated with error."
|
21181
|
441 |
|
21184
|
442 |
|ok|
|
21181
|
443 |
|
|
444 |
[
|
21185
|
445 |
ok := self startProcess.
|
|
446 |
ok ifTrue:[
|
21208
|
447 |
self waitUntilFinished.
|
|
448 |
ok := self finishedWithSuccess.
|
21185
|
449 |
].
|
21184
|
450 |
] ifCurtailed:[
|
|
451 |
"/ we were interrupted -
|
|
452 |
"/ terminate the os-command (and all of its forked commands)
|
21185
|
453 |
pid notNil ifTrue:[
|
|
454 |
self terminateGroup.
|
|
455 |
].
|
21181
|
456 |
].
|
21184
|
457 |
^ ok.
|
21181
|
458 |
!
|
|
459 |
|
21172
|
460 |
startProcess
|
21184
|
461 |
"If there are non-external streams, setup transfer (shuffler) processes
|
|
462 |
to transfer data from a pipe to the internal stream.
|
|
463 |
Start the command.
|
|
464 |
Answer true if the command could be started, false if not.
|
|
465 |
Return immediately (do not wait until the command is finished)."
|
|
466 |
|
21200
|
467 |
|externalInStream externalAuxStream externalErrorStream externalOutStream|
|
21184
|
468 |
|
21200
|
469 |
shufflerProcesses := OrderedCollection new:4.
|
|
470 |
streamsToClose := OrderedCollection new:2.
|
21184
|
471 |
|
|
472 |
externalInStream := self setupShufflerForInput:inStream.
|
|
473 |
externalAuxStream := self setupShufflerForInput:auxStream.
|
21226
|
474 |
externalOutStream := self setupShufflerForOutput:outStream.
|
21184
|
475 |
errorStream == outStream ifTrue:[
|
21226
|
476 |
externalErrorStream := externalOutStream.
|
21184
|
477 |
] ifFalse:[
|
|
478 |
externalErrorStream := self setupShufflerForOutput:errorStream.
|
|
479 |
].
|
|
480 |
|
|
481 |
"start the command"
|
21200
|
482 |
finishSema := EventSemaphore new.
|
21172
|
483 |
|
|
484 |
Processor
|
|
485 |
monitor:[
|
|
486 |
pid := OperatingSystem
|
21200
|
487 |
startProcess:command
|
|
488 |
inputFrom:externalInStream
|
|
489 |
outputTo:externalOutStream
|
|
490 |
errorTo:externalErrorStream
|
|
491 |
auxFrom:externalAuxStream
|
|
492 |
environment:environment
|
|
493 |
inDirectory:directory
|
|
494 |
newPgrp:newPgrp
|
|
495 |
showWindow:showWindow.
|
21172
|
496 |
]
|
|
497 |
action:[:status |
|
|
498 |
status stillAlive ifFalse:[
|
|
499 |
exitStatus := status.
|
|
500 |
pid notNil ifTrue:[
|
|
501 |
OperatingSystem closePid:pid.
|
|
502 |
].
|
21223
|
503 |
"/ shufflerProcesses do:[:eachProcess|
|
|
504 |
"/ "terminate the shuffler processes.
|
|
505 |
"/ They close the local side of the pipe when being terminated"
|
|
506 |
"/ eachProcess terminate.
|
|
507 |
"/ ].
|
|
508 |
finishSema signal.
|
21206
|
509 |
terminateActionBlock value.
|
21172
|
510 |
].
|
|
511 |
].
|
|
512 |
|
21184
|
513 |
"we can close the remote side of the pipes after the os process has been started (after the fork)"
|
|
514 |
streamsToClose do:[:eachStream | eachStream close].
|
|
515 |
streamsToClose := nil.
|
|
516 |
|
21172
|
517 |
pid isNil ifTrue:[
|
21184
|
518 |
"process could not be started - terminate shufflers"
|
|
519 |
shufflerProcesses do:[:eachProcess|
|
|
520 |
eachProcess terminate.
|
|
521 |
].
|
|
522 |
shufflerProcesses := nil.
|
21172
|
523 |
exitStatus := OperatingSystem osProcessStatusClass processCreationFailure.
|
21208
|
524 |
finishSema signal.
|
21184
|
525 |
^ false.
|
21172
|
526 |
].
|
|
527 |
|
|
528 |
^ true.
|
|
529 |
! !
|
|
530 |
|
12890
|
531 |
!OSProcess methodsFor:'terminating'!
|
|
532 |
|
|
533 |
kill
|
|
534 |
"kill the process - the process does not get the chance to clean up"
|
|
535 |
|
21208
|
536 |
pid notNil ifTrue:[
|
|
537 |
OperatingSystem killProcess:pid.
|
|
538 |
].
|
12890
|
539 |
!
|
|
540 |
|
|
541 |
killGroup
|
20379
|
542 |
"kill the processGroup - the processes do not get the chance to clean up"
|
|
543 |
|
21208
|
544 |
pid notNil ifTrue:[
|
|
545 |
OperatingSystem
|
|
546 |
killProcessGroup:pid;
|
|
547 |
killProcess:pid.
|
|
548 |
].
|
12890
|
549 |
!
|
|
550 |
|
|
551 |
terminate
|
|
552 |
"terminate the process gracefully"
|
|
553 |
|
21208
|
554 |
pid notNil ifTrue:[
|
|
555 |
OperatingSystem terminateProcess:pid.
|
|
556 |
].
|
12890
|
557 |
!
|
|
558 |
|
|
559 |
terminateGroup
|
|
560 |
"terminate the process group.
|
|
561 |
Under Windows, these is the same as terminateWithhAllChildren,
|
|
562 |
under unix, this terminates a subset of all children"
|
|
563 |
|
21208
|
564 |
pid notNil ifTrue:[
|
|
565 |
OperatingSystem
|
|
566 |
terminateProcessGroup:pid;
|
|
567 |
terminateProcess:pid.
|
|
568 |
].
|
21184
|
569 |
! !
|
|
570 |
|
|
571 |
!OSProcess methodsFor:'waiting'!
|
|
572 |
|
|
573 |
waitUntilFinished
|
21208
|
574 |
^ self waitUntilFinishedWithTimeout:nil
|
|
575 |
!
|
|
576 |
|
|
577 |
waitUntilFinishedWithTimeout:timeout
|
21184
|
578 |
|processList|
|
|
579 |
|
21208
|
580 |
(finishSema waitWithTimeout:timeout) isNil ifTrue:[
|
|
581 |
"timed out"
|
|
582 |
^ nil.
|
|
583 |
].
|
21184
|
584 |
|
|
585 |
"have to wait until the shufflers have finished their work"
|
21208
|
586 |
processList := shufflerProcesses.
|
|
587 |
processList notEmptyOrNil ifTrue:[
|
21184
|
588 |
processList do:[:eachProcess |
|
|
589 |
eachProcess waitUntilTerminated.
|
|
590 |
].
|
|
591 |
shufflerProcesses := nil.
|
|
592 |
].
|
12890
|
593 |
! !
|
|
594 |
|
|
595 |
!OSProcess class methodsFor:'documentation'!
|
|
596 |
|
19298
|
597 |
version
|
|
598 |
^ '$Header$'
|
|
599 |
!
|
|
600 |
|
12890
|
601 |
version_CVS
|
19286
|
602 |
^ '$Header$'
|
12890
|
603 |
! !
|
19286
|
604 |
|
21172
|
605 |
|
|
606 |
OSProcess initialize!
|