How to terminate a process ?
Posted by Joseph Frippiat-2 on Dec 29, 2004; 11:08pm
URL: https://forum.world.st/How-to-terminate-a-process-tp3372531.html
When I run this code in my application :
myProcess terminate.
myProcess := nil.
myProcess is not set to nil ( but the process is "dead" ).
So I played with the SlidingBallDemo and I modify the method stopStepProcess
like this :
stopStepProcess
self isRunning ifTrue: [
Transcript show: 'halt 1'; cr.
self stepProcess terminate.
Transcript show: 'halt 2'; cr.
stepProcess := nil ]
If the process is running when the method is executed, then Transcript shows
'halt 1' but not 'halt 2' (the process is dead but stepProcess is not set to
nil).
If the process is dead when the method is executed, then it shows the two
strings (stepProcess is set to nil) .
What did I miss ?
Thanks
Joseph