Ticket #6175: daemon.patch
File daemon.patch, 793 bytes (added by , 17 years ago) |
---|
-
django/utils/daemonize.py
7 7 # First fork 8 8 try: 9 9 if os.fork() > 0: 10 sys.exit(0) # kill off parent10 os._exit(0) # kill off parent 11 11 except OSError, e: 12 12 sys.stderr.write("fork #1 failed: (%d) %s\n" % (e.errno, e.strerror)) 13 13 sys.exit(1) … … 18 18 # Second fork 19 19 try: 20 20 if os.fork() > 0: 21 sys.exit(0)21 os._exit(0) 22 22 except OSError, e: 23 23 sys.stderr.write("fork #2 failed: (%d) %s\n" % (e.errno, e.strerror)) 24 24 sys.exit(1)