in reply to Re: nohup & PERL.
in thread nohup & PERL.

Thanks this is good information. Unfortunately, the programs are on two servers across a network so IPC won't work. Also, the problem is not a normal death. It is when a kill comes from the outside. Is there a way to capture all signals? If so, then I could explicitly kill the netcat process, otherwise I'm still toast. What I was really hoping for was a way to call a process from PERL that forces the child process to die if PERL, the parent process, dies. Thanks, Daniel

Replies are listed 'Best First'.
Re: Re: Re: nohup & PERL.
by hossman (Prior) on Apr 17, 2002 at 00:53 UTC
Re: Re: Re: nohup & PERL.
by belg4mit (Prior) on Apr 17, 2002 at 01:09 UTC
    Again I recommend reading perlipc, as hossman has seconded. The other things he also suggests are good places to start.

    As for capturing all signals you might look at sigtrap. Or you could do the following:

    $SIG{$_} = \&handler for keys %SIG;
    Note that will also call handler when you die or warn.

    --
    perl -pe "s/\b;([mnst])/'\1/mg"