use Errno qw( EINTR ); for (;;) { my @ready = $select->can_read() or do { next if $! == EINTR; last; }; for my $fh (@ready) { ... } }
Untested.
Note that die("select: $!\n"); would be more appropriate than last, but I preserved the behaviour of the OP.
In reply to Re: IO::Select and alarm()
by ikegami
in thread IO::Select and alarm()
by Maddingue
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |