OSProcess: making sure that a child process always dies

Joshua Gargus schwa at fastmail.us
Thu Mar 15 07:53:37 UTC 2007


Hi John,

Unfortunately, in this case I'm forking Someone Else's Binary, not a  
Squeak image that is itself running OSProcess.  It's GPLed, so I  
could always hack it if necessary, but I'd rather do it from Smalltalk.

Thanks for the idea,
Josh


On Mar 15, 2007, at 12:48 AM, John M McIntosh wrote:

> when I asked that question last fall, when I was trying to figure  
> out how the VM process forked by the browser plugin would terminate
> if the browser crashed, someone mentioned.
>
> 		if (getppid() == 1)
>
> if getppid returns 1, then the original parent process has gone  
> away.   I added this check to the VM when it knows it's running as a
> subtask of the browser and as a chore we do every couple of seconds.
>
>
> On Mar 15, 2007, at 12:15 AM, Joshua Gargus wrote:
>
>> Hi,
>>
>> Is there a way to use OSProcess on OS X (or unix in general) to  
>> cause forked child processes to die when the parent Squeak process  
>> quits?
>>
>> Thanks,
>> Josh
>>
>
> --
> ====================================================================== 
> =====
> John M. McIntosh <johnmci at smalltalkconsulting.com>
> Corporate Smalltalk Consulting Ltd.  http:// 
> www.smalltalkconsulting.com
> ====================================================================== 
> =====
>
>
>




More information about the Squeak-dev mailing list