daemon.py: petit debug

This commit is contained in:
Daniel STAN 2015-03-20 15:42:36 +01:00
parent e0a0fb60c8
commit 796caf2546

View file

@ -22,7 +22,11 @@ def run():
conn.close() conn.close()
# fork en arrière plan + pidfile # fork en arrière plan + pidfile
if __name__ == "__main__": if __name__ == "__main__":
if '-fg' in sys.argv:
run()
exit()
# do the UNIX double-fork magic, see Stevens' "Advanced # do the UNIX double-fork magic, see Stevens' "Advanced
# Programming in the UNIX Environment" for details (ISBN 0201563177) # Programming in the UNIX Environment" for details (ISBN 0201563177)
try: try: