Messages in this thread | | | Date | Sun, 10 Aug 1997 23:08:38 +1000 | From | Richard Gooch <> | Subject | Re: Killing clones |
| |
Ingo Molnar writes: > > On Sun, 10 Aug 1997, Richard Gooch wrote: > > > Hi, all. I make heavy use of the clone syscall in a number of > > applications, and everything works well except when the parent process > > dies (say from a SEGV or a call to abort). The problem is the cloned > > processes hang around until I manually kill them. I note that there > > seems to be a mechanism to choose which signal is sent to the parent > > if a child dies (CSIGNAL mask), but not the other way around. > > Is there a solution to this problem? I tried cloning the PID but that > > stuffs up sending signals to the clones. > > LinuxThreads uses a 'manager thread' (which is not the main thread) that > can do exactly this kind of cleanup stuff.
But how does this manager know when the parent has died? Does it periodically wake up and check if its ppid == 1? Yuk.
> the real solution will be Posix.1b RT signal handling ...
Yeah, well, that would be nice. But until then...
Regards,
Richard....
| |