cvs commit: apache-1.3/src/main http_log.c
bjh 99/05/30 01:55:30 Modified:src/main http_log.c Log: Fix piped logs under OS/2 Revision ChangesPath 1.78 +8 -4 apache-1.3/src/main/http_log.c Index: http_log.c === RCS file: /home/cvs/apache-1.3/src/main/http_log.c,v retrieving revision 1.77 retrieving revision 1.78 diff -u -r1.77 -r1.78 --- http_log.c1999/04/27 20:36:31 1.77 +++ http_log.c1999/05/30 08:55:29 1.78 @@ -172,8 +172,10 @@ child_pid = spawnl(_P_NOWAIT, SHELL_PATH, SHELL_PATH, /c, (char *)cmd, NULL); return(child_pid); #elif defined(OS2) -/* For OS/2 we need to use a '/' */ -execl(SHELL_PATH, SHELL_PATH, /c, (char *)cmd, NULL); +/* For OS/2 we need to use a '/' and spawn the child rather than exec as + * we haven't forked */ +child_pid = spawnl(P_NOWAIT, SHELL_PATH, SHELL_PATH, /c, (char *)cmd, NULL); +return(child_pid); #else execl(SHELL_PATH, SHELL_PATH, -c, (char *)cmd, NULL); #endif @@ -727,8 +729,10 @@ child_pid = spawnl(_P_NOWAIT, SHELL_PATH, SHELL_PATH, /c, (char *)cmd, NULL); return(child_pid); #elif defined(OS2) -/* For OS/2 we need to use a '/' */ -execl (SHELL_PATH, SHELL_PATH, /c, (char *)cmd, NULL); +/* For OS/2 we need to use a '/' and spawn the child rather than exec as + * we haven't forked */ +child_pid = spawnl(P_NOWAIT, SHELL_PATH, SHELL_PATH, /c, (char *)cmd, NULL); +return(child_pid); #else execl (SHELL_PATH, SHELL_PATH, -c, (char *)cmd, NULL); #endif
cvs commit: apache-1.3/src/main http_log.c
dgaudet 99/03/11 08:52:39 Modified:src/main http_log.c Log: remove the extra httpd: logged for each error message Reviewed by: Marc Slemko, Ralf S. Engelschall Revision ChangesPath 1.76 +1 -2 apache-1.3/src/main/http_log.c Index: http_log.c === RCS file: /home/cvs/apache-1.3/src/main/http_log.c,v retrieving revision 1.75 retrieving revision 1.76 diff -u -r1.75 -r1.76 --- http_log.c1999/01/01 19:04:48 1.75 +++ http_log.c1999/03/11 16:52:38 1.76 @@ -322,8 +322,7 @@ } if (logf) { - len = ap_snprintf(errstr, sizeof(errstr), %s: [%s] , - ap_server_argv0, ap_get_time()); + len = ap_snprintf(errstr, sizeof(errstr), [%s] , ap_get_time()); } else { len = 0; }
cvs commit: apache-1.3/src/main http_log.c
marc98/10/22 17:34:21 Modified:src/main http_log.c Log: apache -- Apache in log message. Revision ChangesPath 1.73 +1 -1 apache-1.3/src/main/http_log.c Index: http_log.c === RCS file: /export/home/cvs/apache-1.3/src/main/http_log.c,v retrieving revision 1.72 retrieving revision 1.73 diff -u -r1.72 -r1.73 --- http_log.c1998/10/03 14:28:55 1.72 +++ http_log.c1998/10/23 00:34:20 1.73 @@ -481,7 +481,7 @@ */ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, NULL, ap_psprintf(p, -pid file %s overwritten -- Unclean shutdown of previous apache run?, +pid file %s overwritten -- Unclean shutdown of previous Apache run?, fname) ); }
cvs commit: apache-1.3/src/main http_log.c
rse 98/10/03 07:07:09 Modified:src CHANGES src/main http_log.c Log: Fix stderr redirection under syslog-based error logging situation. PS: This is actually an extracted sub-patch of a large patch which contains lots of style changes, too. The style changes I'll commit in a second round (I don't want to commit the stuff mixed together). Only one change (2-STDERR_FILENO) is committed also now, because it's more like a bugfix. Submitted by: Youichirou Koga [EMAIL PROTECTED] PR: 3095 Revision ChangesPath 1.1092+3 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1091 retrieving revision 1.1092 diff -u -r1.1091 -r1.1092 --- CHANGES 1998/10/03 13:38:29 1.1091 +++ CHANGES 1998/10/03 14:07:07 1.1092 @@ -1,5 +1,8 @@ Changes with Apache 1.3.3 + *) Fix stderr redirection under syslog-based error logging situation. + [Youichirou Koga [EMAIL PROTECTED]] PR#3095 + *) Document `ErrorLog syslog:facility' variant of error logging. [Youichirou Koga [EMAIL PROTECTED]] PR#3096 1.71 +4 -3 apache-1.3/src/main/http_log.c Index: http_log.c === RCS file: /export/home/cvs/apache-1.3/src/main/http_log.c,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- http_log.c1998/09/25 12:27:05 1.70 +++ http_log.c1998/10/03 14:07:08 1.71 @@ -239,7 +239,7 @@ if (s_main-error_log) { /* replace stderr with this new log */ fflush(stderr); - if (dup2(fileno(s_main-error_log), 2) == -1) { + if (dup2(fileno(s_main-error_log), STDERR_FILENO) == -1) { ap_log_error(APLOG_MARK, APLOG_CRIT, s_main, unable to replace stderr with error_log); } else { @@ -271,8 +271,9 @@ } API_EXPORT(void) ap_error_log2stderr (server_rec *s) { -if(fileno(s-error_log) != STDERR_FILENO) -dup2(fileno(s-error_log),STDERR_FILENO); +if ( s-error_log != NULL + fileno(s-error_log) != STDERR_FILENO) +dup2(fileno(s-error_log), STDERR_FILENO); } static void log_error_core (const char *file, int line, int level,
cvs commit: apache-1.3/src/main http_log.c
rse 98/10/03 07:28:56 Modified:src/main http_log.c Log: The second part of the patch from Youichirou Koga [EMAIL PROTECTED] (PR#3095). These are now only coding style fixups, because the bugfix parts I've already extracted and committed separately. Revision ChangesPath 1.72 +89 -86apache-1.3/src/main/http_log.c Index: http_log.c === RCS file: /export/home/cvs/apache-1.3/src/main/http_log.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -r1.71 -r1.72 --- http_log.c1998/10/03 14:07:08 1.71 +++ http_log.c1998/10/03 14:28:55 1.72 @@ -154,7 +154,7 @@ {NULL, -1}, }; -static int error_log_child (void *cmd, child_info *pinfo) +static int error_log_child(void *cmd, child_info *pinfo) { /* Child process code for 'ErrorLog |...'; * may want a common framework for this, since I expect it will @@ -165,23 +165,23 @@ ap_cleanup_for_exec(); #ifdef SIGHUP /* No concept of a child process on Win32 */ -signal (SIGHUP, SIG_IGN); +signal(SIGHUP, SIG_IGN); #endif /* ndef SIGHUP */ #if defined(WIN32) -child_pid = spawnl (_P_NOWAIT, SHELL_PATH, SHELL_PATH, /c, (char *)cmd, NULL); +child_pid = spawnl(_P_NOWAIT, SHELL_PATH, SHELL_PATH, /c, (char *)cmd, NULL); return(child_pid); #elif defined(OS2) /* For OS/2 we need to use a '/' */ -execl (SHELL_PATH, SHELL_PATH, /c, (char *)cmd, NULL); +execl(SHELL_PATH, SHELL_PATH, /c, (char *)cmd, NULL); #else -execl (SHELL_PATH, SHELL_PATH, -c, (char *)cmd, NULL); +execl(SHELL_PATH, SHELL_PATH, -c, (char *)cmd, NULL); #endif -exit (1); +exit(1); /* NOT REACHED */ return(child_pid); } -static void open_error_log (server_rec *s, pool *p) +static void open_error_log(server_rec *s, pool *p) { char *fname; @@ -190,9 +190,9 @@ if (!ap_spawn_child(p, error_log_child, (void *)(s-error_fname+1), kill_after_timeout, dummy, NULL, NULL)) { - perror (ap_spawn_child); - fprintf (stderr, Couldn't fork child for ErrorLog process\n); - exit (1); + perror(ap_spawn_child); + fprintf(stderr, Couldn't fork child for ErrorLog process\n); + exit(1); } s-error_log = dummy; @@ -219,8 +219,8 @@ } #endif else { - fname = ap_server_root_relative (p, s-error_fname); -if(!(s-error_log = ap_pfopen(p, fname, a))) { + fname = ap_server_root_relative(p, s-error_fname); +if (!(s-error_log = ap_pfopen(p, fname, a))) { perror(fopen); fprintf(stderr,httpd: could not open error log file %s.\n, fname); exit(1); @@ -228,12 +228,12 @@ } } -void ap_open_logs (server_rec *s_main, pool *p) +void ap_open_logs(server_rec *s_main, pool *p) { server_rec *virt, *q; int replace_stderr; -open_error_log (s_main, p); +open_error_log(s_main, p); replace_stderr = 1; if (s_main-error_log) { @@ -262,21 +262,23 @@ if (q-error_fname != NULL strcmp(q-error_fname, virt-error_fname) == 0) break; - if (q == virt) open_error_log (virt, p); - else virt-error_log = q-error_log; + if (q == virt) + open_error_log(virt, p); + else + virt-error_log = q-error_log; } else virt-error_log = s_main-error_log; } } -API_EXPORT(void) ap_error_log2stderr (server_rec *s) { +API_EXPORT(void) ap_error_log2stderr(server_rec *s) { if ( s-error_log != NULL fileno(s-error_log) != STDERR_FILENO) dup2(fileno(s-error_log), STDERR_FILENO); } -static void log_error_core (const char *file, int line, int level, +static void log_error_core(const char *file, int line, int level, const server_rec *s, const request_rec *r, const char *fmt, va_list args) { @@ -424,7 +426,7 @@ #endif } -API_EXPORT(void) ap_log_error (const char *file, int line, int level, +API_EXPORT(void) ap_log_error(const char *file, int line, int level, const server_rec *s, const char *fmt, ...) { va_list args; @@ -457,18 +459,19 @@ va_end(args); } -void ap_log_pid (pool *p, char *fname) +void ap_log_pid(pool *p, char *fname) { FILE *pid_file; struct stat finfo; static pid_t saved_pid = -1; pid_t mypid; -if (!fname) return; +if (!fname) + return; -fname = ap_server_root_relative (p, fname); +fname = ap_server_root_relative(p, fname); mypid = getpid(); -
cvs commit: apache-1.3/src/main http_log.c
dgaudet 98/09/22 08:43:43 Modified:src/main http_log.c Log: ap_table_set() causes an ap_pstrdup() of both arguments, one of the arguments is a constant and it's a waste to pstrdup it. Furthermore using a static local buffer means there is a static limit to the message length. Also, ap_pvsprintf() can get away with zero-copies of the output in most cases, whereas ap_pstrdup() always copies the output at least once. Unlike Ken's claim there's no gyration required by ap_pv?sprintf() to figure out the string length. Clean this all up. Revision ChangesPath 1.69 +2 -4 apache-1.3/src/main/http_log.c Index: http_log.c === RCS file: /export/home/cvs/apache-1.3/src/main/http_log.c,v retrieving revision 1.68 retrieving revision 1.69 diff -u -r1.68 -r1.69 --- http_log.c1998/09/21 17:29:45 1.68 +++ http_log.c1998/09/22 15:43:42 1.69 @@ -441,10 +441,8 @@ va_start(args, fmt); log_error_core(file, line, level, r-server, r, fmt, args); if (ap_table_get(r-notes, error-notes) == NULL) { - char errstr[MAX_STRING_LEN]; - - ap_vsnprintf(errstr, sizeof(errstr), fmt, args); - ap_table_set(r-notes, error-notes, errstr); + ap_table_setn(r-notes, error-notes, + ap_pvsprintf(r-pool, fmt, args)); } va_end(args); }
cvs commit: apache-1.3/src/main http_log.c
rse 98/09/21 10:29:46 Modified:src/main http_log.c Log: I knew it: It's always best to think about a patch one hour more. After I again and again read the patch (because I wanted to make sure we don't break anything just before release), I find out: _both_ ap_snprintf and ap_psprintf are wrong in the context. Because args is a va_list and _CANNOT_ be used safely for ap_snprintf and therefore not for ap_psprintf, too. But (pu) we have ap_vsnprintf in our libap, so use this... So, we fix two things here: 1. The logic of the if-clause 2. The string creating itself Revision ChangesPath 1.68 +2 -2 apache-1.3/src/main/http_log.c Index: http_log.c === RCS file: /export/home/cvs/apache-1.3/src/main/http_log.c,v retrieving revision 1.67 retrieving revision 1.68 diff -u -r1.67 -r1.68 --- http_log.c1998/09/18 04:29:07 1.67 +++ http_log.c1998/09/21 17:29:45 1.68 @@ -440,10 +440,10 @@ va_start(args, fmt); log_error_core(file, line, level, r-server, r, fmt, args); -if (ap_table_get(r-notes, error-notes) != NULL) { +if (ap_table_get(r-notes, error-notes) == NULL) { char errstr[MAX_STRING_LEN]; - ap_snprintf(errstr, sizeof(errstr), fmt, args); + ap_vsnprintf(errstr, sizeof(errstr), fmt, args); ap_table_set(r-notes, error-notes, errstr); } va_end(args);
cvs commit: apache-1.3/src/main http_log.c
coar98/09/17 21:29:08 Modified:.STATUS src CHANGES src/main http_log.c Log: In ap_log_rerror(), set the error-notes special entry in r-notes to the error message, unless it's already set to something else. This makes the actual error available to ErrorDocument scripts and the like, while allowing it to be overridden by storing a value in that entry. Reviewed by: Doug MacEachern Revision ChangesPath 1.469 +0 -6 apache-1.3/STATUS Index: STATUS === RCS file: /export/home/cvs/apache-1.3/STATUS,v retrieving revision 1.468 retrieving revision 1.469 diff -u -r1.468 -r1.469 --- STATUS1998/09/17 16:30:46 1.468 +++ STATUS1998/09/18 04:29:05 1.469 @@ -63,12 +63,6 @@ Available Patches: -* Ken's patch to set *ERROR_NOTES by default in ap_log_rerror() - Avoids special-casing the setting everywhere, and allows sensitive - error_log-only messages to be kept out of *ERROR_NOTES. - Message-ID: [EMAIL PROTECTED] - Status: Ken +1, Doug +1 - * Patches for the DSO/mod_perl problem (see below for description): Doug MacEachern's [PATCH] fix for dso/mod_perl 1.1068+3 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1067 retrieving revision 1.1068 diff -u -r1.1067 -r1.1068 --- CHANGES 1998/09/17 20:23:47 1.1067 +++ CHANGES 1998/09/18 04:29:06 1.1068 @@ -1,5 +1,8 @@ Changes with Apache 1.3.2 + *) When using ap_log_rerror(), make the error message available to the + *ERROR_NOTES envariables by default. [Ken Coar] + *) BS2000 platform only: get rid of the nasty BS2000AuthFile. You now must define a BS2000Account name for the server User. This has fewer security implications than the old approach. 1.67 +8 -2 apache-1.3/src/main/http_log.c Index: http_log.c === RCS file: /export/home/cvs/apache-1.3/src/main/http_log.c,v retrieving revision 1.66 retrieving revision 1.67 diff -u -r1.66 -r1.67 --- http_log.c1998/09/15 00:15:18 1.66 +++ http_log.c1998/09/18 04:29:07 1.67 @@ -433,13 +433,19 @@ va_end(args); } -API_EXPORT(void) ap_log_rerror (const char *file, int line, int level, - const request_rec *r, const char *fmt, ...) +API_EXPORT(void) ap_log_rerror(const char *file, int line, int level, +const request_rec *r, const char *fmt, ...) { va_list args; va_start(args, fmt); log_error_core(file, line, level, r-server, r, fmt, args); +if (ap_table_get(r-notes, error-notes) != NULL) { + char errstr[MAX_STRING_LEN]; + + ap_snprintf(errstr, sizeof(errstr), fmt, args); + ap_table_set(r-notes, error-notes, errstr); +} va_end(args); }
cvs commit: apache-1.3/src/main http_log.c
rse 98/09/09 23:58:19 Modified:src CHANGES src/main http_log.c Log: Fix the ap_log_error_old(), ap_log_unixerr() and ap_log_printf() functions: First all three functions no longer fail on strings containing % chars and second ap_log_printf() no longer does a double-formatting (instead it directly passes through the message to be formatted to the real internal formatting function). PR: 2941 Revision ChangesPath 1.1049+6 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1048 retrieving revision 1.1049 diff -u -r1.1048 -r1.1049 --- CHANGES 1998/09/09 22:05:23 1.1048 +++ CHANGES 1998/09/10 06:58:17 1.1049 @@ -1,5 +1,11 @@ Changes with Apache 1.3.2 + *) Fix the ap_log_error_old(), ap_log_unixerr() and ap_log_printf() + functions: First all three functions no longer fail on strings containing + % chars and second ap_log_printf() no longer does a double-formatting + (instead it directly passes through the message to be formatted to the + real internal formatting function). [Ralf S. Engelschall] PR#2941 + *) Allow Include directives anywhere in the server config files (but not .htaccess files). [Ken Coar] PR#2727 1.65 +3 -5 apache-1.3/src/main/http_log.c Index: http_log.c === RCS file: /export/home/cvs/apache-1.3/src/main/http_log.c,v retrieving revision 1.64 retrieving revision 1.65 diff -u -r1.64 -r1.65 --- http_log.c1998/08/10 16:17:54 1.64 +++ http_log.c1998/09/10 06:58:19 1.65 @@ -460,23 +460,21 @@ API_EXPORT(void) ap_log_error_old (const char *err, server_rec *s) { -ap_log_error(APLOG_MARK, APLOG_ERR, s, err); +ap_log_error(APLOG_MARK, APLOG_ERR, s, %s, err); } API_EXPORT(void) ap_log_unixerr (const char *routine, const char *file, const char *msg, server_rec *s) { -ap_log_error(file, 0, APLOG_ERR, s, msg); +ap_log_error(file, 0, APLOG_ERR, s, %s, msg); } API_EXPORT(void) ap_log_printf (const server_rec *s, const char *fmt, ...) { -char buf[MAX_STRING_LEN]; va_list args; va_start(args, fmt); -ap_vsnprintf(buf, sizeof(buf), fmt, args); -ap_log_error(APLOG_MARK, APLOG_ERR, s, buf); +log_error_core(APLOG_MARK, APLOG_ERR, s, NULL, fmt, args); va_end(args); }
cvs commit: apache-1.3/src/main http_log.c
dgaudet 98/08/10 09:17:55 Modified:src/main http_log.c Log: be a little more uniform, use [client %s] similar to other log fields Revision ChangesPath 1.64 +1 -1 apache-1.3/src/main/http_log.c Index: http_log.c === RCS file: /export/home/cvs/apache-1.3/src/main/http_log.c,v retrieving revision 1.63 retrieving revision 1.64 diff -u -r1.63 -r1.64 --- http_log.c1998/08/06 17:30:29 1.63 +++ http_log.c1998/08/10 16:17:54 1.64 @@ -353,7 +353,7 @@ * first. -djg */ len += ap_snprintf(errstr + len, sizeof(errstr) - len, - (client %s): , r-connection-remote_ip); + [client %s] , r-connection-remote_ip); } if (!(level APLOG_NOERRNO) (save_errno != 0)
cvs commit: apache-1.3/src/main http_log.c
martin 98/05/04 09:28:47 Modified:src CHANGES src/main http_log.c Log: BS2000 Debug Logging logs relative paths now, as in unix Revision ChangesPath 1.816 +4 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.815 retrieving revision 1.816 diff -u -u -r1.815 -r1.816 --- CHANGES 1998/05/04 06:58:02 1.815 +++ CHANGES 1998/05/04 16:28:45 1.816 @@ -1,5 +1,9 @@ Changes with Apache 1.3b7 + *) Fix debug log messages for BS2000/OSD: instead of logging the whole + absolute path, only log base name of logging source as is done + in unix. [Martin Kraemer] + *) Ronald Tschalaer's Accept-Encoding patch - preserve the x- in the encoding type from the Accept-Encoding header (if it's there) and use it in the response, as that's probably what it'll be expecting. 1.56 +18 -0 apache-1.3/src/main/http_log.c Index: http_log.c === RCS file: /home/cvs/apache-1.3/src/main/http_log.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -u -r1.55 -r1.56 --- http_log.c1998/05/03 17:16:59 1.55 +++ http_log.c1998/05/04 16:28:47 1.56 @@ -325,6 +325,24 @@ [%s] , priorities[level APLOG_LEVELMASK].t_name); if (file (level APLOG_LEVELMASK) == APLOG_DEBUG) { +#ifdef _OSD_POSIX + char tmp[256]; + char *e = strrchr(file, '/'); + + /* In OSD/POSIX, the compiler returns for __FILE__ + * a string like: __FILE__=*POSIX(/usr/include/stdio.h) + * (it even returns an absolute path for sources in + * the current directory). Here we try to strip this + * down to the basename. + */ + if (e != NULL e[1] != '\0') { + ap_snprintf(tmp, sizeof(tmp), %s, e[1]); + e = tmp[strlen(tmp)-1]; + if (*e == ')') + *e = '\0'; + file = tmp; + } +#endif /*_OSD_POSIX*/ len += ap_snprintf(errstr + len, sizeof(errstr) - len, %s(%d): , file, line); }
cvs commit: apache-1.3/src/main http_log.c
martin 98/04/27 15:38:05 Modified:src CHANGES src/main http_log.c Log: Suppress error(0) messages for ap_log_error() when the APLOG_NOERRNO is unset (as it is in situations like timeouts) where it is unclear whether errno is set or not. It is questionable whether the ap_log_error() timeout calls in http_protocol should not have an APLOG_NOERRNO as well. Revision ChangesPath 1.800 +4 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.799 retrieving revision 1.800 diff -u -u -r1.799 -r1.800 --- CHANGES 1998/04/27 13:01:05 1.799 +++ CHANGES 1998/04/27 22:37:47 1.800 @@ -1,5 +1,9 @@ Changes with Apache 1.3b7 + *) Suppress error(0) messages for ap_log_error() when the APLOG_NOERRNO + is unset (as it is in situations like timeouts) where it is unclear + whether errno is set or not. [Martin Kraemer] + *) Just having APACI's localstatedir is too general and not enough for most of the systems. 1.3b6 again required manual APACI patches by package maintainers from RedHat and FreeBSD because for their filesystem layout a 1.54 +1 -0 apache-1.3/src/main/http_log.c Index: http_log.c === RCS file: /home/cvs/apache-1.3/src/main/http_log.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -u -r1.53 -r1.54 --- http_log.c1998/04/18 10:54:55 1.53 +++ http_log.c1998/04/27 22:38:05 1.54 @@ -328,6 +328,7 @@ %s(%d): , file, line); } if (!(level APLOG_NOERRNO) + (save_errno != 0) #ifdef WIN32 !(level APLOG_WIN32ERROR) #endif
cvs commit: apache-1.3/src/main http_log.c
dgaudet 98/04/11 11:51:35 Modified:src/main http_log.c Log: overzealous renaming Revision ChangesPath 1.52 +5 -5 apache-1.3/src/main/http_log.c Index: http_log.c === RCS file: /export/home/cvs/apache-1.3/src/main/http_log.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- http_log.c1998/04/11 12:00:29 1.51 +++ http_log.c1998/04/11 18:51:34 1.52 @@ -389,15 +389,15 @@ } -void ap_log_pid (pool *p, char *ap_pid_fname) +void ap_log_pid (pool *p, char *fname) { FILE *pid_file; -if (!ap_pid_fname) return; -ap_pid_fname = ap_server_root_relative (p, ap_pid_fname); -if(!(pid_file = fopen(ap_pid_fname,w))) { +if (!fname) return; +fname = ap_server_root_relative (p, fname); +if(!(pid_file = fopen(fname,w))) { perror(fopen); -fprintf(stderr,httpd: could not log pid to file %s\n, ap_pid_fname); +fprintf(stderr,httpd: could not log pid to file %s\n, fname); exit(1); } fprintf(pid_file,%ld\n,(long)getpid());