in reply to Re: second alarm(0)
in thread second alarm(0)
On server under high load and alarm(1) instead of alarm(5) there is nothing unusual in my scenario. And second SIGALRM will trigger default handler resulting in killing current process.eval { local $SIG{ALRM} = sub {die "alarm here"}; alarm(5); eval { long_code(); }; # HERE COME FIRST SIGALRM alarm(0); die if $@; # propagate error } # HERE COME SECOND SIGALRM alarm(0); die if $@ && $@ !~ /alarm here/;
|
|---|