--- a/Process.st Wed Feb 18 17:41:39 1998 +0100
+++ b/Process.st Fri Feb 20 20:10:27 1998 +0100
@@ -1358,22 +1358,35 @@
|wasBlocked|
- "/ if the receiver had no chance to execute yet,
- "/ it can be shot without a signal.
+ Processor activeProcess ~~ self ifTrue:[
+ "/ if the receiver had no chance to execute yet,
+ "/ it can be shot down without a signal.
- wasBlocked := OperatingSystem blockInterrupts.
- [
- self suspendedContext isNil ifTrue:[
+ wasBlocked := OperatingSystem blockInterrupts.
+ [
+ self suspendedContext isNil ifTrue:[
+ self terminateNoSignal.
+ ^ self
+ ]
+ ] valueNowOrOnUnwindDo:[
+ wasBlocked ifFalse:[OperatingSystem unblockInterrupts]
+ ].
+
+ self interruptWith:[
+ Signal noHandlerSignal handle:[:ex |
+ ex parameter signal == TerminateSignal ifTrue:[
+ ex return.
+ ].
+ ex reject.
+ ] do:[
+ TerminateSignal raise.
+ ].
self terminateNoSignal.
- ^ self
]
- ] valueNowOrOnUnwindDo:[
- wasBlocked ifFalse:[OperatingSystem unblockInterrupts]
- ].
+ ] ifFalse:[
+ "/ terminating myself
- self interruptWith:[
Signal noHandlerSignal handle:[:ex |
-
ex parameter signal == TerminateSignal ifTrue:[
ex return.
].
@@ -1477,6 +1490,6 @@
!Process class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Process.st,v 1.89 1997-11-03 15:29:58 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Process.st,v 1.90 1998-02-20 19:10:27 cg Exp $'
! !
Process initialize!