mac carbon VM 3.8.14b3 pending

John M McIntosh johnmci at smalltalkconsulting.com
Wed Nov 22 06:29:54 UTC 2006


Thank you for this clue, I tried having the VM write to the plugin  
via the pipe ever so often,
but couldn't get it to throw an interesting error code to catch.

However using getppid() and checking every 10 seconds or so enables  
me to terminate the VM if the browser has crashed. Since
the VM has to do periodic tasks, like look for and schedule carbon  
events, ensure the screen is flushed in a timely manner it was easy  
to add in yet another housekeeping task.

On 20-Nov-06, at 2:18 PM, Juergen Gmeiner wrote:

> On 20.11.2006, at 21:53, John M McIntosh wrote:
>> Normally what will happen is if the plugin instance is destroyed  
>> we then sigterm the associated child process.   But if the browser  
>> crashes, not uncommon, the sub-process are left running... Mmm I  
>> wonder if the child process can get notification if the parent is  
>> terminated?
>
> Notification - no.  But it can check it's parent process via getppid 
> ().  If a process's parent is terminated, it gets the process with  
> PID 1 as new parent.  It's not init as in traditional unix systems  
> but launchd, but it seems they kept the magic process id 1.
>
> cheers,
> Juergen
>
> -- 
> Juergen Gmeiner
>
>
>
>

--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===





More information about the Squeak-dev mailing list