set sigchild to SIG_IGN instead of SIG_DFL
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 8 Jul 2008 06:31:23 +0000 (16:31 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 8 Jul 2008 06:31:23 +0000 (16:31 +1000)
server/ctdb_daemon.c
server/ctdb_recoverd.c

index a7f9086e27b5628f96d47116adcfa598732bfae5..83fcc0aa53779eba88fb8dd66262a90c6fbd684a 100644 (file)
@@ -662,9 +662,6 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork)
                }
        }
        block_signal(SIGPIPE);
-       
-       /* we dont want any SIGCHLD */
-       signal(SIGCHLD, SIG_DFL);
 
        if (ctdb->do_setsched) {
                /* try to set us up as realtime */
@@ -734,6 +731,9 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork)
        /* start the transport going */
        ctdb_start_transport(ctdb);
 
+       /* we dont want any SIGCHLD */
+       signal(SIGCHLD, SIG_IGN);
+
        /* go into a wait loop to allow other nodes to complete */
        event_loop_wait(ctdb->ev);
 
index 837c0b154519fe1979b9fb7da0434cab23e54f45..9059b1c614c9df869ad9f579cd6d1be31f6e9173 100644 (file)
@@ -3011,6 +3011,9 @@ int ctdb_start_recoverd(struct ctdb_context *ctdb)
                exit(1);
        }
 
+       /* we dont want any SIGCHLD */
+       signal(SIGCHLD, SIG_IGN);
+
        monitor_cluster(ctdb);
 
        DEBUG(DEBUG_ALERT,("ERROR: ctdb_recoverd finished!?\n"));