Instead of setting $SIG{ALRM} : local $SIG{ALRM} = sub { die "alarm" }; try something like the following: use POSIX qw(SIGALRM); POSIX::sigaction(SIGALRM, POSIX::SigAction->new(sub { die "alarm" })) or die "Error setting SIGALRM handler: $!\n";
In reply to Re^2: timeout problem with alarm
by Anonymous Monk
in thread timeout problem with alarm
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |