Red Hat Bugzilla – Bug 99093
Cannot set undef timeout in perl 5.8.0 IO::Socket
Last modified: 2007-04-18 12:55:39 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b)
Gecko/20030516 Mozilla Firebird/0.6
Description of problem:
In perl 5.8.0, the IO::Socket implementation is broken such that you cannot set
an undefined timeout to create a blocking socket. This was broken in an attempt
to allow a 0 second timeout. Now, if you set an undefined timeout, it sets a 0
second timeout, which means calls to accept() return immediately (in essence, a
non-blocking socket). The fix is easy. At http://bugs.perl.org/, bug ID 22965
has the very simple patch to allow both 0-second timeouts and undefined timeouts
I consider this a major bug. Not being able to turn sockets into blocking
sockets breaks a lot of perl code.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. $sock = IO::Socket->new(..., 'Timeout' => 5);
Actual Results: accept() call returns immediately, even if there is nothing to
Expected Results: accept() call returns when there is something to accept, and
this is purely an upstream bug; we will incorporate any fix they make but it
needs to come from upstream
bugs.perl.org RT #22965
perl patch #20193
Sorry for the long delay in process this bug.
Upstream perl patch #20193 has been applied to the next RHEL-3 perl version,
perl-5.8.0-90.2, in which this bug should be fixed .
This should be fixed in current Fedora and RHEL releases.