Bug 40689 - the -w option does not work, instead, the program waits for connect() to return.
Summary: the -w option does not work, instead, the program waits for connect() to return.
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: nc   
(Show other bugs)
Version: 7.1
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2001-05-15 14:04 UTC by Joseph Pepin
Modified: 2014-03-17 02:20 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-05-15 14:28:34 UTC
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 14:05 UTC, Joseph Pepin
no flags Details | Diff

Description Joseph Pepin 2001-05-15 14:04:10 UTC
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 14:05:58 UTC
Created attachment 18410 [details]
A patch to bug 40689

Comment 2 Tim Powers 2001-05-15 14:27:24 UTC
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 16:05:21 UTC
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.