Bug 99093 - Cannot set undef timeout in perl 5.8.0 IO::Socket
Cannot set undef timeout in perl 5.8.0 IO::Socket
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: perl (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jason Vas Dias
David Lawrence
:
Depends On:
Blocks: 175135
  Show dependency treegraph
 
Reported: 2003-07-14 09:45 EDT by Hrunting Johnson
Modified: 2007-04-18 12:55 EDT (History)
0 users

See Also:
Fixed In Version: FC5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-07 16:21:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Hrunting Johnson 2003-07-14 09:45:13 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
to coexist.

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):
perl-5.8.0-88

How reproducible:
Always

Steps to Reproduce:
1. $sock = IO::Socket->new(..., 'Timeout' => 5);
2. $sock->timeout(undef);
3. $sock->accept();
    

Actual Results:  accept() call returns immediately, even if there is nothing to
accept.

Expected Results:  accept() call returns when there is something to accept, and
not before.

Additional info:

bugs.perl.org, #22965
Comment 1 Chip Turner 2003-07-21 16:03:45 EDT
this is purely an upstream bug; we will incorporate any fix they make but it
needs to come from upstream
Comment 2 Hrunting Johnson 2003-07-29 11:20:05 EDT
bugs.perl.org RT #22965
perl patch #20193
Comment 3 Jason Vas Dias 2005-11-11 19:29:52 EST
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 .
Comment 5 Bill Nottingham 2006-08-07 16:21:23 EDT
This should be fixed in current Fedora and RHEL releases.

Note You need to log in before you can comment on or make changes to this bug.