select returns EINTR
Brought to you by:
gisle
- libwww-perl bundle version 5.61
- File "lib/LWP/Protocol/http.pm" (other might be
affected too). Line 381. Reads:
my $nfound = select($fbits, undef, undef, $timeout);
This should be something like:
my $nfound;
do {
$nfound = select ($fbits, undef, undef, $timeout);
} while $nfound == -1 && $!{EINTR};
Otherwise signals received by the process will abort
the select reporting a "read timeout". As far as the
server can take several seconds to respond, a large
amount of time is spent in this select call, and the
probability of failure upon signal reception is quite
high.
Other select calls might be affected too, along with
blocking read/write calls.