Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8e9c52e

Browse files
committed
EINTR return from connect() should be treated exactly the same as
EINPROGRESS, according to Florian Hars. I'm not completely convinced but the spec does seem to read that way.
1 parent d90c531 commit 8e9c52e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/interfaces/libpq/fe-connect.c

+2-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.316 2005/08/09 05:14:26 momjian Exp $
11+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.317 2005/08/11 22:53:41 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1082,15 +1082,12 @@ PQconnectPoll(PGconn *conn)
10821082
* since we are in nonblock mode. If it does, well,
10831083
* too bad.
10841084
*/
1085-
retry_connect:
10861085
if (connect(conn->sock, addr_cur->ai_addr,
10871086
addr_cur->ai_addrlen) < 0)
10881087
{
1089-
if (SOCK_ERRNO == EINTR)
1090-
/* Interrupted system call - just try again */
1091-
goto retry_connect;
10921088
if (SOCK_ERRNO == EINPROGRESS ||
10931089
SOCK_ERRNO == EWOULDBLOCK ||
1090+
SOCK_ERRNO == EINTR ||
10941091
SOCK_ERRNO == 0)
10951092
{
10961093
/*

0 commit comments

Comments
 (0)