Tcl Source Code

View Ticket
Login
Ticket UUID: 219237
Title: Inconsistent socket error messages between NT and UNIX
Type: Bug Version: obsolete: 8.3
Submitter: nobody Created on: 2000-10-26 05:03:58
Subsystem: 27. Channel Types Assigned To: andreas_kupries
Priority: 3 Low Severity:
Status: Open Last Modified: 2003-04-23 03:57:24
Resolution: None Closed By:
    Closed on:
Description:
OriginalBugID: 4754 Bug
Version: 8.3
SubmitDate: '2000-03-30'
LastModified: '2000-03-31'
Severity: MED
Status: Assigned
Submitter: sandeep
ChangedBy: ericm
OS: All
FixedDate: '2000-10-25'
ClosedDate: '2000-10-25'


Steps to reproduce:
1.  socket donexist.com 80

Expected Result:
"couldn't open socket: host is unreachable" error

Actual Result:
On Linux and Solaris, you get the expected result.
On NT, you get "couldn't open socket: invalid argument"

At the least, the error messages should be consistent.

In tclUnixChan.c it looks like it is returning EHOSTUNREACH (and that is supported by the error message printed).  On Windows it looks like it is too, but clearly it's not.  Somebody else must be setting errno.

- eric

-- 03/31/2000 ericm
User Comments: davygrvy added on 2003-04-23 03:57:24:
Logged In: YES 
user_id=7549

Notice how WSAHOST_NOT_FOUND is ignored and 
becomes "invalid argument"!

davygrvy added on 2003-04-23 03:55:17:

File Added - 48448: patch.txt

Logged In: YES 
user_id=7549

generally speaking, winsock error messages are discarded in 
favor of their posix translation.  The trouble is, any non 
translatable error code becomes EINVAL...  shame on Tcl for 
this loss of info...

davygrvy added on 2001-09-08 06:51:20:
Logged In: YES 
user_id=7549

I can't look at this right now.

If I had the time, it looks easy though.

andreas_kupries added on 2001-09-08 06:37:12:
Logged In: YES 
user_id=75003

Is there something we can do here ?
Assign to me later.

Attachments: