]> granicus.if.org Git - apache/commitdiff
Need APR_CREATE flag when opening error log & pid file.
authorBrian Havard <bjh@apache.org>
Tue, 19 Oct 1999 15:52:24 +0000 (15:52 +0000)
committerBrian Havard <bjh@apache.org>
Tue, 19 Oct 1999 15:52:24 +0000 (15:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84005 13f79535-47bb-0310-9956-ffa450edef68

server/log.c

index 39c9cd8463c00b8f48e1af7027386146bbee5f27..a96ac034985c33ad2a10b2eba694046510091a09 100644 (file)
@@ -261,7 +261,7 @@ static void open_error_log(server_rec *s, ap_context_t *p)
        fname = ap_server_root_relative(p, s->error_fname);
        /*  Change to AP funcs. */
         if (ap_open(&s->error_log, fname, APR_BUFFERED | APR_APPEND | 
-                    APR_READ | APR_WRITE, APR_OS_DEFAULT, p) != APR_SUCCESS) {
+                    APR_READ | APR_WRITE | APR_CREATE, APR_OS_DEFAULT, p) != APR_SUCCESS) {
             perror("fopen");
             fprintf(stderr, "%s: could not open error log file %s.\n",
                    ap_server_argv0, fname);
@@ -554,7 +554,7 @@ void ap_log_pid(ap_context_t *p, const char *fname)
                               );
     }
 
-    if(ap_open(&pid_file, fname, APR_WRITE | APR_BUFFERED, APR_OS_DEFAULT, p) != APR_SUCCESS) {
+    if(ap_open(&pid_file, fname, APR_WRITE | APR_BUFFERED | APR_CREATE, APR_OS_DEFAULT, p) != APR_SUCCESS) {
        perror("fopen");
         fprintf(stderr, "%s: could not log pid to file %s\n",
                ap_server_argv0, fname);