Handled signals causes blocking system calls to be interrupted (so the signal can be handled). You need to handle those errors.
sub uninterruptible_sleep { my $sleep_until = time() + $_[0]; while (1) { my $time_left = $sleep_until - time(); return if $time_left <= 0; sleep($time_left); } }
In reply to Re: Signal to a sleeping Perl program
by ikegami
in thread Signal to a sleeping Perl program
by jerryhone
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |