#BUGFIX by stefan
authorStefan Vogel <sv@exept.de>
Thu, 11 Apr 2019 15:24:25 +0200
changeset 24058 5ae2c27577c1
parent 24057 4f47ef98d6ad
child 24059 8e9aafd27ba2
#BUGFIX by stefan class: Process changed: #restartable: #start #startTimestamp Keep startBlock in order to find referenced objects of a running process (didn't find refd DNBridge objects in DNBridge helper processes!)
Process.st
--- a/Process.st	Thu Apr 11 10:50:39 2019 +0200
+++ b/Process.st	Thu Apr 11 15:24:25 2019 +0200
@@ -702,7 +702,7 @@
      ProcessorScheduler upon image restart.
      Others have to be restarted manually."
 
-    startBlock isNil ifTrue:[
+    startTimestamp notNil ifTrue:[
         self proceedableError:'cannot be made restartable when already started'.
         ^ self
     ].
@@ -710,6 +710,7 @@
 
     "Modified: / 23-12-1995 / 18:38:32 / cg"
     "Modified: / 24-05-2018 / 21:04:04 / Claus Gittinger"
+    "Modified: / 11-04-2019 / 14:52:12 / Stefan Vogel"
 !
 
 singleStep:aBoolean
@@ -728,9 +729,13 @@
     startTimestamp notNil ifTrue:[
         ^ startTimestamp
     ].
-    "/ the very first system process has no starttime set
-    startTimestamp := Smalltalk imageStartTime.
+    id == 0 ifTrue:[
+        "/ the very first system process has no starttime set
+        startTimestamp := Smalltalk imageStartTime.
+    ].
     ^ startTimestamp
+
+    "Modified: / 11-04-2019 / 15:16:02 / Stefan Vogel"
 !
 
 state
@@ -889,6 +894,7 @@
     ^ false
 ! !
 
+
 !Process methodsFor:'interrupts'!
 
 blockInterrupts
@@ -1766,7 +1772,7 @@
 
     |block|
 
-    startBlock isNil ifTrue:[
+    (restartable ~~ true and:[startTimestamp notNil]) ifTrue:[
         "is this artificial restriction useful ?"
         self proceedableError:'a process cannot be started twice'.
         ^ self.
@@ -1782,9 +1788,9 @@
 
     "save block for possible restart"
     block := startBlock.
-    restartable ~~ true ifTrue:[
-        startBlock := nil
-    ].
+"/    restartable ~~ true ifTrue:[
+"/        startBlock := nil
+"/    ].
 
     [
         "/
@@ -1806,6 +1812,7 @@
     "Modified: / 17-11-2001 / 16:45:32 / cg"
     "Modified: / 31-01-2017 / 16:41:05 / stefan"
     "Modified: / 24-05-2018 / 21:04:12 / Claus Gittinger"
+    "Modified: / 11-04-2019 / 14:56:09 / Stefan Vogel"
 ! !
 
 !Process methodsFor:'suspend & resume'!