Change your long sleep to a loop:
my $count = 100; sleep 1 while --$count;
This will consume negligable cpu but remain responsive even under safe-signals on any platform.
In reply to Re: sleep and waking on signal handlers
by BrowserUk
in thread sleep and waking on signal handlers
by TedYoung
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |