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

Commit 81357b3

Browse files
committed
Seems a bad idea to assume that select(2) doesn't touch the input masks
if it returns EINTR.
1 parent b634118 commit 81357b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/interfaces/libpq/fe-misc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*
2626
*
2727
* IDENTIFICATION
28-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.45 2001/02/11 04:56:57 momjian Exp $
28+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.46 2001/02/17 03:37:22 tgl Exp $
2929
*
3030
*-------------------------------------------------------------------------
3131
*/
@@ -320,11 +320,11 @@ pqReadReady(PGconn *conn)
320320
if (!conn || conn->sock < 0)
321321
return -1;
322322

323+
retry:
323324
FD_ZERO(&input_mask);
324325
FD_SET(conn->sock, &input_mask);
325326
timeout.tv_sec = 0;
326327
timeout.tv_usec = 0;
327-
retry:
328328
if (select(conn->sock + 1, &input_mask, (fd_set *) NULL, (fd_set *) NULL,
329329
&timeout) < 0)
330330
{
@@ -354,11 +354,11 @@ pqWriteReady(PGconn *conn)
354354
if (!conn || conn->sock < 0)
355355
return -1;
356356

357+
retry:
357358
FD_ZERO(&input_mask);
358359
FD_SET(conn->sock, &input_mask);
359360
timeout.tv_sec = 0;
360361
timeout.tv_usec = 0;
361-
retry:
362362
if (select(conn->sock + 1, (fd_set *) NULL, &input_mask, (fd_set *) NULL,
363363
&timeout) < 0)
364364
{

0 commit comments

Comments
 (0)