X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fdaemon.c;h=c8033fbec79a6a6147d9c060d045bb45d3fa0030;hb=ba18611;hp=78f88a0f9bb4f0bab5d9a745a7570a28b9a1065d;hpb=a9633ada756ec15e1ed3dd9b503af3027dee3d10;p=openvswitch diff --git a/lib/daemon.c b/lib/daemon.c index 78f88a0f..c8033fbe 100644 --- a/lib/daemon.c +++ b/lib/daemon.c @@ -18,8 +18,10 @@ #include "daemon.h" #include #include +#include #include #include +#include #include #include #include "command-line.h" @@ -30,10 +32,10 @@ #include "socket-util.h" #include "timeval.h" #include "util.h" - -#define THIS_MODULE VLM_daemon #include "vlog.h" +VLOG_DEFINE_THIS_MODULE(daemon) + /* Should we run in the background? */ static bool detach; @@ -446,6 +448,10 @@ daemonize_start(void) } make_pidfile(); + + /* Make sure that the unixctl commands for vlog get registered in a + * daemon, even before the first log message. */ + vlog_init(); } /* If daemonization is configured, then this function notifies the parent