- or download this
use IPC::Open3;
...
waitpid($pid, 0);
print "after waitpid\n";
}
- or download this
3297
loop 1
...
Status is: sleep 11
Status is: sleep 11
Status is: sleep 11
- or download this
print "Status is: $status\n";
- or download this
sub default { print "got SIG ".shift()."\n"}
$SIG{$_} = \&default for keys %SIG;
$SIG{USR1} = \&status;
- or download this
#!/usr/bin/perl
# have to print to a terminal directly,
...
$SIG{$_} = \&default for keys %SIG;
sleep $_ for 1..shift;
- or download this
3437
loop 1
...
after waitpid
loop 2
...