in reply to Re^2: Cannot catch ALRM signal for timeout
in thread Cannot catch ALRM signal for timeout
for me, this prints "timeout" and hangs on close.open(WORKER,"yes >/dev/null |"); eval{ local $SIG{ALRM} = sub { die "alarm\n" }; alarm 1; $str = <WORKER>; alarm 0; }; if ($@) { print "timeout\n"; close WORKER; return 0; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Cannot catch ALRM signal for timeout
by Magice (Novice) on Dec 08, 2009 at 13:24 UTC | |
by Fox (Pilgrim) on Dec 08, 2009 at 13:54 UTC |