#FEATURE by cg
class: AbstractOperatingSystem
added: #startProcess:inputFrom:outputTo:errorTo:auxFrom:environment:inDirectory:newPgrp:showWindow:
--- a/AbstractOperatingSystem.st Tue Nov 08 20:12:13 2016 +0100
+++ b/AbstractOperatingSystem.st Tue Nov 08 20:16:11 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1988 by Claus Gittinger
All Rights Reserved
@@ -962,6 +960,25 @@
startProcess:aCommandString inputFrom:anExternalInStream outputTo:anExternalOutStream
errorTo:anExternalErrStream auxFrom:anExternalAuxStreamOrNil environment:environment
+ inDirectory:dir newPgrp:newPgrp showWindow:showWindowBooleanOrNil
+
+ "start executing the OS command as specified by the argument, aCommandString
+ as a separate process; do not wait for the command to finish.
+ The commandString is passed to a shell for execution - see the description of
+ 'sh -c' in your UNIX manual ('cmd.com' in your MSDOS manual).
+ The command gets stdIn, stdOut and stdErr assigned from the arguments;
+ each may be nil.
+ Return the processId if successful, nil otherwise.
+ Use #monitorPid:action: for synchronization and exec status return,
+ or #killProcess: to stop it."
+
+ "raise an error: must be redefined in concrete subclass(es)"
+
+ ^ self subclassResponsibility
+!
+
+startProcess:aCommandString inputFrom:anExternalInStream outputTo:anExternalOutStream
+ errorTo:anExternalErrStream auxFrom:anExternalAuxStreamOrNil environment:environment
inDirectory:dir showWindow:showWindowBooleanOrNil
"start executing the OS command as specified by the argument, aCommandString