Ticket #8540: daemonize.diff
File daemonize.diff, 617 bytes (added by , 16 years ago) |
---|
-
django/utils/daemonize.py
24 24 sys.stderr.write("fork #2 failed: (%d) %s\n" % (e.errno, e.strerror)) 25 25 os._exit(1) 26 26 27 # Close all open files: 28 for fd in xrange(0, os.sysconf('SC_OPEN_MAX')): 29 try: 30 os.close(fd) 31 except OSError: 32 pass 33 27 34 si = open('/dev/null', 'r') 28 35 so = open(out_log, 'a+', 0) 29 36 se = open(err_log, 'a+', 0)