Author: breser
Date: Thu Aug 22 19:38:53 2013
New Revision: 1516556

URL: http://svn.apache.org/r1516556
Log:
* subversion/svnserve/svnserve.c
  (write_pid_file): Make sure that we create the pid file.

Patch by: danielsh

Modified:
    subversion/trunk/subversion/svnserve/svnserve.c

Modified: subversion/trunk/subversion/svnserve/svnserve.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svnserve/svnserve.c?rev=1516556&r1=1516555&r2=1516556&view=diff
==============================================================================
--- subversion/trunk/subversion/svnserve/svnserve.c (original)
+++ subversion/trunk/subversion/svnserve/svnserve.c Thu Aug 22 19:38:53 2013
@@ -439,8 +439,9 @@ static svn_error_t *write_pid_file(const
   const char *contents = apr_psprintf(pool, "%" APR_PID_T_FMT "\n",
                                              getpid());
 
+  SVN_ERR(svn_io_remove_file2(filename, TRUE, pool));
   SVN_ERR(svn_io_file_open(&file, filename,
-                           APR_WRITE | APR_CREATE | APR_TRUNCATE,
+                           APR_WRITE | APR_CREATE | APR_EXCL,
                            APR_OS_DEFAULT, pool));
   SVN_ERR(svn_io_file_write_full(file, contents, strlen(contents), NULL,
                                  pool));


Reply via email to