------art_33534_27410610.1149431789609
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

How does your parent process die unexpectedly? If it catches signal 9, for
example, your atexit handlers won't run. You could try something dramatic
like open a socketpair between parent and child processes (don't forget to
turn off CLOEXEC for forking) and then have the child processes periodically
send a byte to the parent. If you lose the parent, then the write from the
child should catch SIGPIPE. Also possible is for the children to
periodically to check the status of the parent process (getppid).

On 6/4/06, Ohad Lutzky <lutzky / gmail.com> wrote:
>
> Sorry about the Macabre, but that's essentially what I want: It seems
> that children of my process (created using fork) get reparanted to init
> when my process dies unexpectedly. I'd like to have them all die on the
> spot instead (not wait for them to finish - kill them on the spot). How
> do I do this?
>
> I assume it would have to do with a big begin/rescue/end block around
> the whole app...
>
> --
> Posted via http://www.ruby-forum.com/.
>
>

------art_33534_27410610.1149431789609--