[squeak-dev] Re: Resuming a terminated process

Paolo Bonzini bonzini at gnu.org
Thu Mar 27 09:01:52 UTC 2008


Andreas Raab wrote:
> Hi -
> 
> Here is an interesting one:
> 
>   p := [self inform: 'Oh, noes'] fork.
>   p terminate.
>   p resume.
> 
> This works fine on all Squeak versions that I've tried it on. Do people 
> agree that this is a bug and should raise an error or is there any 
> reason why it should behave the way it does right now?

I don't know if this is the case, but I can see why this happens: 
terminating is not something that happens instantaneously when you send 
#terminate.  In particular, it could take a while if p has a low priority.

I don't remember offhand is Squeak has a #primTerminate method, or 
something like that, that is basically

     suspendedContext := nil.
     self suspend

If it has, allowing to resume after a #primTerminate would definitely be 
a bug.

Paolo




More information about the Squeak-dev mailing list