dont log an error if we waitpid but there is no child process to wait for
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 1 Mar 2011 08:41:43 +0000 (19:41 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 1 Mar 2011 08:41:43 +0000 (19:41 +1100)
server/ctdb_daemon.c

index 1dbf3e6eca3a28af3091a4d900d9eceb5d403954..3eb832e13af38baa319195251cd9604c578b0bbb 100644 (file)
@@ -695,7 +695,7 @@ static void sig_child_handler(struct event_context *ev,
 
        while (pid != 0) {
                pid = waitpid(-1, &status, WNOHANG);
-               if (pid == -1) {
+               if (pid == -1 && errno != ECHILD) {
                        DEBUG(DEBUG_ERR, (__location__ " waitpid() returned error. errno:%d\n", errno));
                        return;
                }