[sysadmin-bin] Make sure the child process gets into its own process group to avoid the parent to kill it once it r



commit 102ec95aa652c5d10114c2b385051f72af20aac9
Author: Andrea Veri <averi redhat com>
Date:   Thu Sep 13 22:53:44 2018 +0200

    Make sure the child process gets into its own process group to avoid the parent to kill it once it 
receives a signal to terminate (presumably after the ssh connection ends right after a git push)

 git/util.py | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/git/util.py b/git/util.py
index f350196..0e67d04 100644
--- a/git/util.py
+++ b/git/util.py
@@ -120,6 +120,8 @@ def start_email():
             os.dup2(devnullout, 2)
             os.close(devnullout)
 
+            os.setsid()
+
             # Fork again to daemonize
             if os.fork() > 0:
                 sys.exit(0)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]