daemon: Close standard file descriptors after detach for windows.
[sliver-openvswitch.git] / lib / daemon-windows.c
index f059fc5..4d33b8c 100644 (file)
@@ -402,11 +402,6 @@ get_detach()
     return detach;
 }
 
-void
-daemon_save_fd(int fd OVS_UNUSED)
-{
-}
-
 void
 daemonize(void)
 {
@@ -472,6 +467,9 @@ daemonize_complete(void)
      * communicate with the parent to inform that the child is ready. */
     if (detached) {
         int error;
+
+        close_standard_fds();
+
         error = WriteFile(write_handle, "a", 1, NULL, NULL);
         if (!error) {
             VLOG_FATAL("Failed to communicate with the parent (%s)",