cygwin not setting errno on "Connection refused" errors

Christoph H. Hochstaetter christoph@hochstaetter.de
Fri Jun 6 19:17:00 GMT 2014


>I just updated cygwin today, and I've noticed that errno is not being
>set when there's a connection refused error.  This appears to be true
>for INET and UNIX domain sockets.
>
>For example:
>
>$ ssh -p 12345 localhost
>ssh: connect to host localhost port 12345: No error
>
>
>Notice how it reports "No error" instead of "Connection refused".
>
>I'm using version 1.7.30 of cygwin64.  I don't remember what version I
>was at before I upgraded.

I can confirm that this happens to every application using connect().
errno always returns 0 if connect() returns < 0. strerror() then correctly
says "No error". Worked in 1.7.29. Tested with 64 bit only.

-Christoph

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list