in reply to SIG and system
However, I find that I get different results using backticks compared to system:Because "system" and backticks block "SIGINT" and "SIGQUIT", killing the program they're running doesn't actually interrupt your program.
$Abort will increment if I use backticks, not if I use system.use strict; use warnings; my $Abort=0; $SIG{INT} = sub { ++$Abort }; for (1..10) { print "Iteration $_: Abort = $Abort\n"; `sleep 5`; }
|
|---|