in reply to Catching Kill Process
You set up the signal handler AFTER you've run the command. That's too late.
Perhaps the following will be of use:
The interrupt handler is a no-op basically. You cannot, however, set it to IGNORE. That'd also ignore the interrupt in spawned $cmd.{ local @SIG{'INT', 'TERM'} = (sub {warn 'Interrupt!'}) x 2; `$cmd -P ALL $interval >> $path`; } # rest of the code in the module which Creates ... files
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Catching Kill Process
by Jabox (Sexton) on Jun 25, 2014 at 14:14 UTC | |
by Jabox (Sexton) on Jun 25, 2014 at 15:03 UTC |