cURL / Mailing Lists / curl-users / Single Mail


Re: bug assistance needed

From: Andrés García <>
Date: Thu, 22 Nov 2001 01:56:29 +0100


It seems the error happens after curl tries to connect, the connect()
function returns a '-1' with an EINPROGRESS error, which is interpreted
as if the the connection was non-blocking and consider valid.

Yet the man page says:

The socket is non-blocking and the connection cannot be completed
immediately. It is possible to select(2) or poll(2) for completion by
selecting the socket for writing. After select indicates writability, use
getsockopt(2) to read the SO_ERROR option at level SOL_SOCKET to determine
whether connect completed successfully (SO_ERROR is zero) or unsuccessfully
(SO_ERROR is one of the usual error codes listed here, explaining the reason
for the failure.

Unfortunately it seems as if the connect() function uses the same error to say
that the connection is non-blocking and that there is no connection at all(!).

I hope that makes sense.

Received on 2001-11-22