]> 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:49 +0000 (22:28 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 7 Apr 2013 02:28:49 +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 c61d54c51f847fec17518ee22fdeed2472c0c524..f2807799d6e538c9075a3a45b79d3d8c512949f8 100644 (file)
@@ -716,6 +716,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();
                }