SIGUSR1 causes the process to break out of a
sleep.
Note that the C code:
for(;;) {
sleep(1);
}
is
not semantically equivalent to the Perl code:
while(sleep(1)) {
}
Instead, in Perl, try either of the following for the same effect:
- for (;;) { sleep(1) }
- while (1) { sleep(1) }
- sleep(1) while 1;