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
This commit is contained in:
Malcolm Tredinnick 2008-03-18 14:08:56 +00:00
parent 1b331f6c1e
commit 4b9497c3f1
1 changed files with 2 additions and 2 deletions

View File

@ -18,10 +18,10 @@ if os.name == 'posix':
# Second fork # Second fork
try: try:
if os.fork() > 0: if os.fork() > 0:
sys.exit(0) os._exit(0)
except OSError, e: except OSError, e:
sys.stderr.write("fork #2 failed: (%d) %s\n" % (e.errno, e.strerror)) sys.stderr.write("fork #2 failed: (%d) %s\n" % (e.errno, e.strerror))
sys.exit(1) os._exit(1)
si = open('/dev/null', 'r') si = open('/dev/null', 'r')
so = open(out_log, 'a+', 0) so = open(out_log, 'a+', 0)