summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-08-11 22:53:41 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-08-11 22:53:41 +0000
commit8e9c52e427e9a0b0b04f75b552c6d02b14c95520 (patch)
tree302bc4025005a3e248c57b443929965affe384bc /src/interfaces/libpq
parentd90c531188196cd4ea6683c7f4395151b42028a2 (diff)
downloadpostgresql-8e9c52e427e9a0b0b04f75b552c6d02b14c95520.tar.gz
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.
Diffstat (limited to 'src/interfaces/libpq')
-rw-r--r--src/interfaces/libpq/fe-connect.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index d91182e2f1..de784d928c 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.316 2005/08/09 05:14:26 momjian Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.317 2005/08/11 22:53:41 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1082,15 +1082,12 @@ keep_going: /* We will come back to here until there
* since we are in nonblock mode. If it does, well,
* too bad.
*/
- retry_connect:
if (connect(conn->sock, addr_cur->ai_addr,
addr_cur->ai_addrlen) < 0)
{
- if (SOCK_ERRNO == EINTR)
- /* Interrupted system call - just try again */
- goto retry_connect;
if (SOCK_ERRNO == EINPROGRESS ||
SOCK_ERRNO == EWOULDBLOCK ||
+ SOCK_ERRNO == EINTR ||
SOCK_ERRNO == 0)
{
/*