diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-02-17 03:37:22 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-02-17 03:37:22 +0000 |
commit | 81357b3c02b3d6463aa3bbc593849839c681a966 (patch) | |
tree | 8a2a595fa4d36b0690d172eb8117d10a882e10dd /src | |
parent | b634118af9ed444cc8ea583f334d7f1fb0a89f60 (diff) | |
download | postgresql-81357b3c02b3d6463aa3bbc593849839c681a966.tar.gz postgresql-81357b3c02b3d6463aa3bbc593849839c681a966.zip |
Seems a bad idea to assume that select(2) doesn't touch the input masks
if it returns EINTR.
Diffstat (limited to 'src')
-rw-r--r-- | src/interfaces/libpq/fe-misc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c index ce3a8fef113..b7acb044674 100644 --- a/src/interfaces/libpq/fe-misc.c +++ b/src/interfaces/libpq/fe-misc.c @@ -25,7 +25,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.45 2001/02/11 04:56:57 momjian Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.46 2001/02/17 03:37:22 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -320,11 +320,11 @@ pqReadReady(PGconn *conn) if (!conn || conn->sock < 0) return -1; +retry: FD_ZERO(&input_mask); FD_SET(conn->sock, &input_mask); timeout.tv_sec = 0; timeout.tv_usec = 0; -retry: if (select(conn->sock + 1, &input_mask, (fd_set *) NULL, (fd_set *) NULL, &timeout) < 0) { @@ -354,11 +354,11 @@ pqWriteReady(PGconn *conn) if (!conn || conn->sock < 0) return -1; +retry: FD_ZERO(&input_mask); FD_SET(conn->sock, &input_mask); timeout.tv_sec = 0; timeout.tv_usec = 0; -retry: if (select(conn->sock + 1, (fd_set *) NULL, &input_mask, (fd_set *) NULL, &timeout) < 0) { |