#FEATURE by cg
class: AbstractOperatingSystem
added:
#exec:withArguments:environment:fileDescriptors:fork:newPgrp:inDirectory:showWindow:
#exec:withArguments:showWindow:
changed: #exec:withArguments:environment:fileDescriptors:fork:newPgrp:inDirectory:
--- a/AbstractOperatingSystem.st Wed Aug 31 18:34:29 2016 +0200
+++ b/AbstractOperatingSystem.st Thu Sep 01 15:59:40 2016 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1988 by Claus Gittinger
All Rights Reserved
@@ -862,6 +864,17 @@
exec:aCommandPath withArguments:argArray environment:env fileDescriptors:fds fork:doFork newPgrp:newGrp inDirectory:aDirectory
"execute an OS command"
+ ^ self
+ exec:aCommandPath withArguments:argArray environment:env fileDescriptors:fds fork:doFork
+ newPgrp:newGrp inDirectory:aDirectory showWindow:nil
+
+ "Created: / 12.11.1998 / 14:46:15 / cg"
+!
+
+exec:aCommandPath withArguments:argArray environment:env fileDescriptors:fds fork:doFork
+ newPgrp:newGrp inDirectory:aDirectory showWindow:showWindowBooleanOrNil
+ "execute an OS command"
+
^ self subclassResponsibility
"Created: / 12.11.1998 / 14:46:15 / cg"
@@ -2338,6 +2351,28 @@
"Created: / 28.1.1998 / 14:14:03 / md"
"Modified: / 28.1.1998 / 14:14:45 / md"
"Modified: / 12.11.1998 / 14:45:06 / cg"
+!
+
+exec:aCommandPath withArguments:argArray showWindow:showWindowBooleanOrNil
+ "execute the OS command specified by the argument, aCommandPath, with
+ arguments in argArray (no arguments, if nil).
+ If successful, this method does NOT return and smalltalk is gone.
+ If not successful, it does return.
+ Can be used on UNIX with fork or on other systems to chain to another program."
+
+ ^ self
+ exec:aCommandPath
+ withArguments:argArray
+ environment:nil
+ fileDescriptors:#(0 1 2)
+ fork:false
+ newPgrp:false
+ inDirectory:nil
+ showWindow:showWindowBooleanOrNil
+
+ "/ never reached ...
+
+ "Modified: / 12.11.1998 / 14:44:26 / cg"
! !
!AbstractOperatingSystem class methodsFor:'file access'!