Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 40689 - the -w option does not work, instead, the program waits for connect() to return.
the -w option does not work, instead, the program waits for connect() to return.
Product: Red Hat Linux
Classification: Retired
Component: nc (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Depends On:
  Show dependency treegraph
Reported: 2001-05-15 10:04 EDT by Joseph Pepin
Modified: 2014-03-16 22:20 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-05-15 10:28:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
A patch to bug 40689 (4.34 KB, patch)
2001-05-15 10:05 EDT, Joseph Pepin
no flags Details | Diff

  None (edit)
Description Joseph Pepin 2001-05-15 10:04:10 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.1b1; Mac_PowerPC)

Description of problem:
There is a bug in the timeout mechanism of netcat under Linux (and 
IRIX) due to the change in the way setjmp/longjmp is implemented in 
the c library.  

How reproducible:

Steps to Reproduce:
1.pick an IP address that you cannot reach (e.g. behind a firewall, 
non-routable, whatever) call it $host
2.nc -vvw2 $host 1-20
3.notice how only the FIRST attempt actualy times out in the 2 
seconds you specify, and the rest wait for a full tcp timeout?  This is 

Actual Results:  The first connect() attempt is correctly cut short after 
2 seconds, while the rest wait for a full timeout.

Expected Results:  Each attempt should have timed out after 2 

Additional info:

This is due to a change in glibc, which decided to go one way, while 
all the other libcs went another- simply because POSIX doesn't care 
one way or the other.

It is broken under every version/distrobution of linux which uses glibc-

I have submitted this to debian already, and now you.
Comment 1 Joseph Pepin 2001-05-15 10:05:58 EDT
Created attachment 18410 [details]
A patch to bug 40689
Comment 2 Tim Powers 2001-05-15 10:27:24 EDT
I'm reassigning this bug. Netcat is included in the nc package in the distro
(not in Powertools).

Comment 3 Bill Nottingham 2001-05-15 12:05:21 EDT
Will be fixed in nc-1.10-11; thanks for the patch!

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