OSProcess: making sure that a child process always dies
David T. Lewis
lewis at mail.msen.com
Mon Mar 19 17:39:20 UTC 2007
On Mon, Mar 19, 2007 at 02:31:06PM +0100, Damien Pollet wrote:
> 2007/3/19, Joshua Gargus <schwa at fastmail.us>:
> >Thanks David, this is very much appreciated.
>
>
> Hi, and thanks too.
>
> I have a similar problem. The method to intercept sigterm seems to
> work only once, so I tried to put a loop in it:
>
> [[
> OSProcess accessor forwardSigUsr1 wait.
> SmalltalkImage current snapshot: true andQuit: false
> ] repeat ] fork
>
> It works once (I kill -USR1 squeak and get a message in the
> transcript), but after that, OSProcess accessor forwardSigUsr1 returns
> nil... that's a problem because the goal is to trigger as many
> snapshots as needed.
>
> Any ideas ?
Damien,
The expression "OSProcess accessor forwardSigUsr1" answers a semaphore
the should be signaled each time the VM receives a SIGUSR1 from the
operating system. If you create the semaphore once, then wait on
in it a loop, I think it will do what you want.
Dave
More information about the Squeak-dev
mailing list
|