[CalendarServer-changes] [1179]
CalendarServer/branches/users/tfitz/log-alot-128-2/lib-patches/
Twisted/twisted.scripts._twistd_unix.patch
source_changes at macosforge.org
source_changes at macosforge.org
Mon Feb 12 18:10:27 PST 2007
Revision: 1179
http://trac.macosforge.org/projects/calendarserver/changeset/1179
Author: tfitz at apple.com
Date: 2007-02-12 18:10:27 -0800 (Mon, 12 Feb 2007)
Log Message:
-----------
Potential hack for race condition.
Added Paths:
-----------
CalendarServer/branches/users/tfitz/log-alot-128-2/lib-patches/Twisted/twisted.scripts._twistd_unix.patch
Added: CalendarServer/branches/users/tfitz/log-alot-128-2/lib-patches/Twisted/twisted.scripts._twistd_unix.patch
===================================================================
--- CalendarServer/branches/users/tfitz/log-alot-128-2/lib-patches/Twisted/twisted.scripts._twistd_unix.patch (rev 0)
+++ CalendarServer/branches/users/tfitz/log-alot-128-2/lib-patches/Twisted/twisted.scripts._twistd_unix.patch 2007-02-13 02:10:27 UTC (rev 1179)
@@ -0,0 +1,25 @@
+Index: twisted/scripts/_twistd_unix.py
+===================================================================
+--- twisted/scripts/_twistd_unix.py (revision 19636)
++++ twisted/scripts/_twistd_unix.py (working copy)
+@@ -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]"
+@@ -129,9 +129,11 @@
+ def daemonize():
+ # See http://www.erlenstar.demon.co.uk/unix/faq_toc.html#TOC16
+ if os.fork(): # launch child and...
++ time.sleep(2)
+ os._exit(0) # kill off parent
+ os.setsid()
+ if os.fork(): # launch child and...
++ time.sleep(2)
+ os._exit(0) # kill off parent again.
+ os.umask(077)
+ null=os.open('/dev/null', os.O_RDWR)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070212/f33a38d4/attachment.html
More information about the calendarserver-changes
mailing list