From: Graham Leggett Date: Tue, 16 Feb 2010 23:09:50 +0000 (+0000) Subject: Make sure the pidfile is deleted on close. X-Git-Tag: 2.3.6~461 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=55f3e480134c1b9d79285e3976132eda08ea787a;p=apache Make sure the pidfile is deleted on close. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@910756 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/htcacheclean.c b/support/htcacheclean.c index 5c6378b68d..43d5117dd2 100644 --- a/support/htcacheclean.c +++ b/support/htcacheclean.c @@ -972,10 +972,9 @@ int main(int argc, const char * const argv[]) apr_file_t *file; pid_t mypid = getpid(); if (APR_SUCCESS == (status = apr_file_open(&file, pidfile, APR_WRITE - | APR_CREATE | APR_TRUNCATE, + | APR_CREATE | APR_TRUNCATE | APR_DELONCLOSE, APR_UREAD | APR_UWRITE | APR_GREAD, pool))) { apr_file_printf(file, "%" APR_PID_T_FMT APR_EOL_STR, mypid); - apr_file_close(file); } else if (!isdaemon) { apr_file_printf(errfile,