From 796caf254607ee9fad65086ebf9c36112c2fd5ab Mon Sep 17 00:00:00 2001 From: Daniel STAN Date: Fri, 20 Mar 2015 15:42:36 +0100 Subject: [PATCH] daemon.py: petit debug --- daemon.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/daemon.py b/daemon.py index 7ca7860..e95bbe6 100755 --- a/daemon.py +++ b/daemon.py @@ -22,7 +22,11 @@ def run(): conn.close() # fork en arrière plan + pidfile + if __name__ == "__main__": + if '-fg' in sys.argv: + run() + exit() # do the UNIX double-fork magic, see Stevens' "Advanced # Programming in the UNIX Environment" for details (ISBN 0201563177) try: