Add ctdb_fork(0 which will fork a child process and drop the real-time
[sahlberg/ctdb.git] / server / ctdb_monitor.c
index 5cc460899e296d81b15996e00406f35078a83665..fa642fb3fd7269a98a9267a5c58cbbf61976a86f 100644 (file)
@@ -83,7 +83,7 @@ void ctdb_run_notification_script(struct ctdb_context *ctdb, const char *event)
                return;
        }
 
-       child = fork();
+       child = ctdb_fork(ctdb);
        if (child == (pid_t)-1) {
                DEBUG(DEBUG_ERR,("Failed to fork() a notification child process\n"));
                return;
@@ -203,7 +203,7 @@ static void ctdb_startup_callback(struct ctdb_context *ctdb, int status, void *p
        } else if (status == 0) {
                DEBUG(DEBUG_NOTICE,("startup event OK - enabling monitoring\n"));
                ctdb->done_startup = true;
-               ctdb->monitor->next_interval = 0;
+               ctdb->monitor->next_interval = 2;
                ctdb_run_notification_script(ctdb, "startup");
        }