X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fdaemon.c;h=54641d078658bcdf6c5227586e335596153c2b52;hb=24b7e19469dbd2cb3fdf8db70ef0c7b4bc851f17;hp=2c8cf32af5da63f0d8eaedffc7fdcf89675bba2f;hpb=bc9fb3a9cd588148e97eaae4eaa200faf0ac8d33;p=sliver-openvswitch.git diff --git a/lib/daemon.c b/lib/daemon.c index 2c8cf32af..54641d078 100644 --- a/lib/daemon.c +++ b/lib/daemon.c @@ -289,7 +289,6 @@ fork_and_clean_up(void) fatal_signal_fork(); } else if (!pid) { /* Running in child process. */ - time_postfork(); lockfile_postfork(); } return pid; @@ -377,6 +376,8 @@ should_restart(int status) { 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 }; @@ -529,6 +530,8 @@ daemonize_start(void) /* Running in daemon process. */ } + forbid_forking("running in daemon process"); + if (pidfile) { make_pidfile(); }