Bug 99093 - Cannot set undef timeout in perl 5.8.0 IO::Socket
Summary: Cannot set undef timeout in perl 5.8.0 IO::Socket
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: perl
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jason Vas Dias
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks: 175135
TreeView+ depends on / blocked
 
Reported: 2003-07-14 13:45 UTC by Hrunting Johnson
Modified: 2007-04-18 16:55 UTC (History)
0 users

Fixed In Version: FC5
Clone Of:
Environment:
Last Closed: 2006-08-07 20:21:23 UTC
Embargoed:


Attachments (Terms of Use)

Description Hrunting Johnson 2003-07-14 13:45:13 UTC
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 20:03:45 UTC
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 15:20:05 UTC
bugs.perl.org RT #22965
perl patch #20193

Comment 3 Jason Vas Dias 2005-11-12 00:29:52 UTC
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 20:21:23 UTC
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.