fatal_signal_fork();
} else if (!pid) {
/* Running in child process. */
- time_postfork();
lockfile_postfork();
}
return pid;
{
if (WIFSIGNALED(status)) {
static const int error_signals[] = {
+ /* This list of signals is documented in daemon.man. If you
+ * change the list, update the documentation too. */
SIGABRT, SIGALRM, SIGBUS, SIGFPE, SIGILL, SIGPIPE, SIGSEGV,
SIGXCPU, SIGXFSZ
};
char *status_msg;
int crashes;
- subprogram_name = "monitor";
+ set_subprogram_name("monitor");
status_msg = xstrdup("healthy");
last_restart = TIME_MIN;
crashes = 0;
/* Running in new daemon process. */
proctitle_restore();
- subprogram_name = "";
+ set_subprogram_name("");
}
/* Close standard file descriptors (except any that the client has requested we
/* Running in daemon process. */
}
+ forbid_forking("running in daemon process");
+
if (pidfile) {
make_pidfile();
}