When a daemon is set to monitor then saved_daemonize_id
needs to be closed in both the monitor and daemon processes
to avoid a leaking a file descriptor. This patch adds the latter.
---
lib/daemon.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/daemon.c b/lib/daemon.c
index ef1a24e..c3f3535 100644
--- a/lib/daemon.c
+++ b/lib/daemon.c
@@ -443,6 +443,8 @@ daemonize_start(void)
monitor_daemon(daemon_pid);
}
/* Running in daemon process. */
+ if (saved_daemonize_fd != -1)
+ close(saved_daemonize_fd);
}
if (pidfile) {
--
1.7.5.4
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev