[CalendarServer-changes] [1177]
CalendarServer/branches/users/tfitz/log-alot-128/lib-patches/Twisted
/twisted.scripts._twistd_unix.patch
source_changes at macosforge.org
source_changes at macosforge.org
Mon Feb 12 17:53:20 PST 2007
Revision: 1177
http://trac.macosforge.org/projects/calendarserver/changeset/1177
Author: tfitz at apple.com
Date: 2007-02-12 17:53:20 -0800 (Mon, 12 Feb 2007)
Log Message:
-----------
A fix? Could it be?
Modified Paths:
--------------
CalendarServer/branches/users/tfitz/log-alot-128/lib-patches/Twisted/twisted.scripts._twistd_unix.patch
Modified: CalendarServer/branches/users/tfitz/log-alot-128/lib-patches/Twisted/twisted.scripts._twistd_unix.patch
===================================================================
--- CalendarServer/branches/users/tfitz/log-alot-128/lib-patches/Twisted/twisted.scripts._twistd_unix.patch 2007-02-13 01:27:13 UTC (rev 1176)
+++ CalendarServer/branches/users/tfitz/log-alot-128/lib-patches/Twisted/twisted.scripts._twistd_unix.patch 2007-02-13 01:53:20 UTC (rev 1177)
@@ -2,7 +2,16 @@
===================================================================
--- twisted/scripts/_twistd_unix.py (revision 19636)
+++ twisted/scripts/_twistd_unix.py (working copy)
-@@ -126,14 +126,47 @@
+@@ -9,7 +9,7 @@
+ from twisted.scripts import mktap
+ from twisted import copyright
+
+-import os, errno, sys
++import os, errno, sys, time
+
+ class ServerOptions(app.ServerOptions):
+ synopsis = "Usage: twistd [options]"
+@@ -126,14 +126,49 @@
sys.stdout.flush()
@@ -14,6 +23,7 @@
def daemonize():
# See http://www.erlenstar.demon.co.uk/unix/faq_toc.html#TOC16
if os.fork(): # launch child and...
++ time.sleep(10)
os._exit(0) # kill off parent
+
+ fout = file(str(os.getpid()) + "_" + randstr() + ".log", "w")
@@ -30,6 +40,7 @@
+
os.setsid()
if os.fork(): # launch child and...
++ time.sleep(10)
os._exit(0) # kill off parent again.
+
+ fout = file(str(os.getpid()) + "_" + randstr() + ".log", "w")
@@ -50,7 +61,7 @@
null=os.open('/dev/null', os.O_RDWR)
for i in range(3):
try:
-@@ -141,6 +174,8 @@
+@@ -141,6 +176,8 @@
except OSError, e:
if e.errno != errno.EBADF:
raise
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070212/c4d9f514/attachment.html
More information about the calendarserver-changes
mailing list