reptile has asked for the wisdom of the Perl Monks concerning the following question:
The situation: I have a process that forks, uses setsid() and then the new process forks again. One process sits and waits for connections and the other loops infinitely to do some background stuff (using shared memory, the process that takes connections will be able to fool with the data the other process uses). The problem is, when I kill the process leader -- the one that setsid()s -- its kid doesn't go away. I was under the impression that when you kill the process group leader the children are killed off too, but I guess I was wrong, or I'm doing something wrong.
The question: How can I get the children to go away when their parent is killed?
local $_ = "0A72656B636148206C72655020726568746F6E41207473754A"; while(s/..$//) { print chr(hex($&)) }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: I got zombies
by BlaisePascal (Monk) on Aug 08, 2000 at 03:48 UTC | |
by tilly (Archbishop) on Aug 08, 2000 at 04:44 UTC | |
by reptile (Monk) on Aug 08, 2000 at 05:53 UTC | |
|
Re: I got zombies
by tye (Sage) on Aug 08, 2000 at 07:35 UTC | |
|
Re: I got zombies
by reptile (Monk) on Aug 09, 2000 at 04:49 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |