Re: Killing clones

Ingo Molnar (mingo@pc7537.hil.siemens.at)
Sun, 10 Aug 1997 15:10:07 +0200 (MET DST)


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.

the real solution will be Posix.1b RT signal handling ...

-- mingo