in reply to Re^2: protect children from SIG{INT}
in thread protect children from SIG{INT}
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: protect children from SIG{INT}
by QM (Parson) on Nov 18, 2005 at 15:12 UTC | |
|
Re^4: protect children from SIG{INT}
by sgifford (Prior) on Nov 18, 2005 at 16:18 UTC |