If a sleeping process catches any signal, it doesn't automatically resume sleep after the handler fires. Your process is exiting because it's done.
To sleep a specified time in spite of interrupts, you need to be prepared to resume sleep. One way in Perl,
The solution I gave would be improved by doing that wherever sleep 5 appears.my $span = 5; $span -= sleep $span while $span > 0;
After Compline,
Zaxo
In reply to Re^3: protect children from SIG{INT}
by Zaxo
in thread protect children from SIG{INT}
by pileofrogs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |