diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-03-18 14:08:56 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-03-18 14:08:56 +0000 |
| commit | 4b9497c3f13d9fb410d552cfceaa98eafb2ffa10 (patch) | |
| tree | 1f545992bd600c9c4fb73b63b550c8c3c76cf50a | |
| parent | 1b331f6c1eadc55e6efe014ec5f5b91df83961ff (diff) | |
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
| -rw-r--r-- | django/utils/daemonize.py | 4 |
1 files 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) |
