From 4b9497c3f13d9fb410d552cfceaa98eafb2ffa10 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Tue, 18 Mar 2008 14:08:56 +0000 Subject: [PATCH] Fixed #6175 -- Use os._exit() instead of sys.exit() in child processes. Based on a patch from Tyson Clugg. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7290 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/utils/daemonize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)