3c7245b
--- trac/util/daemon.py~	2012-02-06 14:53:52.000000000 -0600
3c7245b
+++ trac/util/daemon.py	2012-05-04 08:52:16.513445549 -0500
3c7245b
@@ -46,7 +46,7 @@
3c7245b
 
3c7245b
         # The pid file must be writable
3c7245b
         try:
3c7245b
-            fileobj = open(pidfile, 'r+')
3c7245b
+            fileobj = open(pidfile, 'w+')
3c7245b
             fileobj.close()
3c7245b
         except IOError, e:
3c7245b
             from trac.util.text import exception_to_unicode