I never heard about an automatic resetting of the alarm interval. I know about a different automatic behavior: Perl will automatically resume some system calls after receiving an ALRM signal; that's why the SIG{ ALRM } handler has to explicitly die. For example, this one-liner hangs:
because after the ALRM perl goes back to waiting for input. The one-liner also illustrates that the alarm interval is not automatically reset after the program receives an ALRM signal, since the $SIG{ ALRM } handler is called only once.% perl -le '$|=1; $SIG{ALRM} = sub { print q(Goosed!) }; alarm 2; eval + { <> }; print q(done)'
the lowliest monk
In reply to Re^3: second alarm(0)
by tlm
in thread second alarm(0)
by powerman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |