daemon: Make sure that vlog is initialized when a process daemonizes.
[sliver-openvswitch.git] / lib / daemon.c
index 6cb553a..c8033fb 100644 (file)
@@ -448,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