slaniel has asked for the wisdom of the Perl Monks concerning the following question:
which sends SIGKILL to the process's parent. But of course that doesn't scale: every time I create a new script, I'll have to add that handler in it. And if the parent process happens to not be the parent script -- e.g., if the parent process is a login shell -- that 'kill -9, getppid' has just killed my login shell. So what's the approach here, if I want the parent process to handle all the signals for its children?$SIG{'INT'} = sub { kill -9, getppid() };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Get parent process to handle signals for its children?
by ikegami (Patriarch) on Jul 12, 2006 at 18:53 UTC | |
by Hue-Bond (Priest) on Jul 12, 2006 at 19:08 UTC | |
by slaniel (Acolyte) on Jul 12, 2006 at 19:10 UTC | |
by runrig (Abbot) on Jul 12, 2006 at 19:12 UTC | |
by slaniel (Acolyte) on Jul 12, 2006 at 19:08 UTC | |
by ikegami (Patriarch) on Jul 12, 2006 at 19:13 UTC |