Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #6175 -- Use os._exit() instead of sys.exit() in child processe…

…s. Based

on a patch from Tyson Clugg.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7290 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 4b9497c3f13d9fb410d552cfceaa98eafb2ffa10 1 parent 1b331f6
@malcolmt malcolmt authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/utils/daemonize.py
View
4 django/utils/daemonize.py
@@ -18,10 +18,10 @@ def become_daemon(our_home_dir='.', out_log='/dev/null', err_log='/dev/null'):
# 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)
Please sign in to comment.
Something went wrong with that request. Please try again.