Fix race condition between unsetting SIGCHLD flag and unblocking
authorYoshiyuki Asaba <y-asaba at pgfoundry.org>
Fri, 29 Jun 2007 14:18:20 +0000 (14:18 +0000)
committerYoshiyuki Asaba <y-asaba at pgfoundry.org>
Fri, 29 Jun 2007 14:18:20 +0000 (14:18 +0000)
SIGCHLD signal.

main.c

diff --git a/main.c b/main.c
index f44bd6fd8632b9ad580ff942eb5978ccb1e801fc..ad1deee64c088891c050c8826141cdb5d3cf288b 100644 (file)
--- a/main.c
+++ b/main.c
@@ -57,7 +57,6 @@
                if (sigchld_request) \
                { \
                        reaper(); \
-                       sigchld_request = 0; \
                } \
        } while (0)
 
@@ -1018,6 +1017,7 @@ static void reaper(void)
        POOL_SETMASK(&BlockSig);
 
        pool_debug("reap_handler called");
+       sigchld_request = 0;
 
        if (exiting)
        {