Menu

#17 select returns EINTR

open
nobody
None
5
2001-12-10
2001-12-10
No

- 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.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.