class: RecursionLock
authorClaus Gittinger <cg@exept.de>
Wed, 23 Jan 2013 23:28:47 +0100
changeset 14697 e9ef6bbd0507
parent 14696 2d48fceee3fa
child 14698 5eeda6b08571
class: RecursionLock changed: #critical: repair damage left over from a process holding a recursionlock which died without cleanup. This can only happen when a process dies hard (due to a stack overflow, repeated segv or fatal error)
RecursionLock.st
--- a/RecursionLock.st	Wed Jan 23 23:26:01 2013 +0100
+++ b/RecursionLock.st	Wed Jan 23 23:28:47 2013 +0100
@@ -202,6 +202,10 @@
     "/
     wasBlocked := OperatingSystem blockInterrupts.
     [
+        (process notNil and:[process isDead]) ifTrue:[
+            'RecursionLock [warning]: cleanup lock from dead process' infoPrintCR.
+            process := nil. sema signal.
+        ].
         gotSema := sema wait.
         process := active.
         wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
@@ -318,9 +322,10 @@
 !RecursionLock class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/RecursionLock.st,v 1.36 2011-04-27 15:14:06 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/RecursionLock.st,v 1.37 2013-01-23 22:28:47 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/RecursionLock.st,v 1.36 2011-04-27 15:14:06 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/RecursionLock.st,v 1.37 2013-01-23 22:28:47 cg Exp $'
 ! !
+