]> granicus.if.org Git - postgresql/commitdiff
In isolationtester, retry after EINTR return from select(2).
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 7 Apr 2013 02:28:53 +0000 (22:28 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 7 Apr 2013 02:28:53 +0000 (22:28 -0400)
Per report from Jaime Casanova.  Very curious that no one else has seen
this failure ... but the code is clearly wrong as-is.

src/test/isolation/isolationtester.c

index 0e94bde107b9a9899894c2cda8cb16ac89d1c31e..d44baa541f9a11bda5ed4c99a7d790559fa5ac48 100644 (file)
@@ -709,6 +709,8 @@ try_complete_step(Step * step, int flags)
                ret = select(sock + 1, &read_set, NULL, NULL, &timeout);
                if (ret < 0)                    /* error in select() */
                {
+                       if (errno == EINTR)
+                               continue;
                        fprintf(stderr, "select failed: %s\n", strerror(errno));
                        exit_nicely();
                }