diff --git a/django/utils/daemonize.py b/django/utils/daemonize.py index 9671b8d91f..437c288292 100644 --- a/django/utils/daemonize.py +++ b/django/utils/daemonize.py @@ -18,10 +18,10 @@ if os.name == 'posix': # Second fork try: if os.fork() > 0: - sys.exit(0) + os._exit(0) except OSError, e: sys.stderr.write("fork #2 failed: (%d) %s\n" % (e.errno, e.strerror)) - sys.exit(1) + os._exit(1) si = open('/dev/null', 'r') so = open(out_log, 'a+', 0)