--- a/OSProcess.st Tue Dec 27 14:02:12 2016 +0100
+++ b/OSProcess.st Tue Dec 27 14:02:32 2016 +0100
@@ -436,10 +436,10 @@
Answer true if the command could be started, false if not.
Return immediately (do not wait until the command is finished)."
- |nullStream externalInStream externalAuxStream externalErrorStream externalOutStream|
+ |externalInStream externalAuxStream externalErrorStream externalOutStream|
- shufflerProcesses := OrderedCollection new.
- streamsToClose := OrderedCollection new:3.
+ shufflerProcesses := OrderedCollection new:4.
+ streamsToClose := OrderedCollection new:2.
externalInStream := self setupShufflerForInput:inStream.
externalAuxStream := self setupShufflerForInput:auxStream.
@@ -450,41 +450,21 @@
externalOutStream := self setupShufflerForOutput:outStream.
].
- "make sure, that the command gets a stdin, stdout and stderr"
- externalInStream isNil ifTrue:[
- externalInStream := nullStream := Filename nullDevice readWriteStream.
- streamsToClose add:nullStream.
- ].
- externalOutStream isNil ifTrue:[
- nullStream isNil ifTrue:[
- nullStream := Filename nullDevice writeStream.
- streamsToClose add:nullStream.
- ].
- externalOutStream := nullStream.
- ].
- externalErrorStream isNil ifTrue:[
- nullStream isNil ifTrue:[
- nullStream := Filename nullDevice writeStream.
- streamsToClose add:nullStream.
- ].
- externalErrorStream := nullStream.
- ].
-
"start the command"
- finishSema := Semaphore new.
+ finishSema := EventSemaphore new.
Processor
monitor:[
pid := OperatingSystem
- startProcess:command
- inputFrom:externalInStream
- outputTo:externalOutStream
- errorTo:externalErrorStream
- auxFrom:externalAuxStream
- environment:environment
- inDirectory:directory
- newPgrp:newPgrp
- showWindow:showWindow.
+ startProcess:command
+ inputFrom:externalInStream
+ outputTo:externalOutStream
+ errorTo:externalErrorStream
+ auxFrom:externalAuxStream
+ environment:environment
+ inDirectory:directory
+ newPgrp:newPgrp
+ showWindow:showWindow.
]
action:[:status |
status stillAlive ifFalse:[