[lkml]   [1997]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: 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...



     \ /
      Last update: 2005-03-22 13:40    [W:0.018 / U:6.940 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site