--- a/UnixOperatingSystem.st Thu Jun 30 16:59:56 2016 +0200
+++ b/UnixOperatingSystem.st Thu Jun 30 17:07:18 2016 +0200
@@ -3569,7 +3569,7 @@
The following will no longer work. monitorPid has disappeared
pid notNil ifTrue:[
- Processor monitorPid:pid action:[:OSstatus | sema signal ].
+ Processor monitorPid:pid action:[:osStatus | sema signal ].
].
in close.
out close.
@@ -3577,7 +3577,38 @@
sema wait.
Transcript showCR:'finished'
"
-
+
+ "
+ |pid sema|
+
+ sema := Semaphore new.
+
+ Processor
+ monitor:[
+ pid := OperatingSystem startProcess:'(sleep 2; ls -l) > out 2>err'
+ ]
+ action:[:osStatus | sema signal ].
+
+ sema wait.
+ Transcript showCR:'finished'
+ "
+
+ "
+ |pid sema|
+
+ sema := Semaphore new.
+
+ Processor
+ monitor:[
+ pid := OperatingSystem startProcess:'(sleep 1; echo 1; sleep 9; ls -l) > out 2>err'
+ ]
+ action:[:osStatus | sema signal ].
+
+ Delay waitForSeconds:2.
+ OperatingSystem terminateProcess:pid.
+ Transcript showCR:'terminated'
+ "
+
"Modified: / 21.3.1997 / 10:04:35 / dq"
"Modified: / 15.7.1997 / 16:03:51 / stefan"
"Modified: / 5.6.1998 / 19:03:51 / cg"