From: Gordon Good <[email protected]>

If daemon.py is used with the --monitor option to create a
monitoring process, that monitoring process ends up inheriting
the process group and session of the parent process. This
change causes setsid() to be called for the monitor process
as well as the daemon process.

Signed-off-by: Gordon Good <[email protected]>
---
 python/ovs/daemon.py |    1 +
 1 file changed, 1 insertion(+)

diff --git a/python/ovs/daemon.py b/python/ovs/daemon.py
index 650d250..47deec6 100644
--- a/python/ovs/daemon.py
+++ b/python/ovs/daemon.py
@@ -369,6 +369,7 @@ def daemonize_start():
         daemon_pid = _fork_and_wait_for_startup()
         if daemon_pid > 0:
             # Running in monitor process.
+            os.setsid()
             _fork_notify_startup(saved_daemonize_fd)
             _close_standard_fds()
             _monitor_daemon(daemon_pid)
-- 
1.7.9.5

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to