in reply to Re: background system() and stillalive() sub
in thread background system() and stillalive() sub

if you die, they die also

When the parent process ends it sends a SIGHUP to child processes. That will not kill child processes if they ignore or handle the signal. That can be done in a number of ways, but from perl: $SIG{'HUP'}='IGNORE';. If you do this in the parent then child processes inherit DEFAULT or IGNORE signals in the signal mask (not handlers).

There are several reason why the pid might be required, waitpid or kill spring to mind. See the modules mentioned above, or write your own based on fork.

Replies are listed 'Best First'.
Re^3: background system() and stillalive() sub
by Marshall (Canon) on Aug 02, 2009 at 13:09 UTC
    Handling a signal with something that says "I'm explicitly ignoring this signal" is different than not handling (or not dealing with) the signal at all.

    Basically these signals like SIGINT, will terminate you if you don't have a plan to deal with it. Yes, you can override the default behavior, but I don't think that is what the OP is asking about.