note
hbm
<p>I've only needed alarm once, and this worked:
<c>
eval {
local $SIG{__DIE__} = 'DEFAULT';
local $SIG{ALRM} = sub { die "timeout" };
alarm 2700;
# do things
alarm 0;
};
if ($@) {
if ($@ =~ "timeout" ) {
...
} else {
print "$@\n";
}
alarm 0;
}
</c>
1038733
1038733