# HG changeset patch # User Stefan Vogel # Date 1180353831 -7200 # Node ID 2976029606275687588ded2e6c4f7fd7b5390bdd # Parent d52aa8e066e52e0bb1718a4fba432ece94d5455b #isDead processes with nil processId are dead diff -r d52aa8e066e5 -r 297602960627 Process.st --- a/Process.st Mon May 28 14:02:15 2007 +0200 +++ b/Process.st Mon May 28 14:03:51 2007 +0200 @@ -1238,9 +1238,9 @@ ! isDead - "return true, iff the receiver is a dead process" + "return true, if the receiver is a dead process" - ^ (state isNil or:[state == #dead]) + ^ (id isNil or:[state isNil or:[state == #dead]]) "Modified: 23.12.1995 / 18:35:29 / cg" ! @@ -1392,12 +1392,10 @@ "/ must check again - interrupt could have happened "/ and process already terminated. self isDead ifFalse:[ - id notNil ifTrue:[ - suspendSemaphore isNil ifTrue:[ - suspendSemaphore := Semaphore new name:'process suspend' - ]. - suspendSemaphore wait - ] + suspendSemaphore isNil ifTrue:[ + suspendSemaphore := Semaphore new name:'process suspend' + ]. + suspendSemaphore wait ] ] valueUninterruptably ] @@ -1432,20 +1430,20 @@ |sema didTimeout| + didTimeout := false. + self isDead ifFalse:[ [ "/ must check again - interrupt could have happened "/ and process already terminated. self isDead ifFalse:[ - id notNil ifTrue:[ - sema := Semaphore new name:'process termination'. - self addExitAction:[sema signal]. - didTimeout := (sema waitWithTimeout:secondsOrNil) isNil - ] + sema := Semaphore new name:'process termination'. + self addExitAction:[sema signal]. + didTimeout := (sema waitWithTimeout:secondsOrNil) isNil ] ] valueUninterruptably. ]. - ^ didTimeout == true + ^ didTimeout " |p| @@ -2050,7 +2048,7 @@ !Process class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/Process.st,v 1.165 2007-04-04 19:28:36 stefan Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Process.st,v 1.166 2007-05-28 12:03:51 stefan Exp $' ! ! Process initialize!