eval { $timeout = 1; local $SIG{ALRM} = sub { die "alarm\n" }; alarm $timeout; $ret = sysread($sock, $buf, 100); alarm 0; };
In reply to Re^2: How to make sysread timeout
by redss
in thread How to make sysread timeout
by redss
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |