From eefcb4c5224d68d1fc57163a2a55449b1004b247 Mon Sep 17 00:00:00 2001 From: "Roy T. Fielding" Date: Fri, 19 May 2000 07:14:54 +0000 Subject: [PATCH] Fix warnings on use of common prototypes. Fix bug of printing a pointer to proc_t instead of the actual pid on error. Submitted by: Jeff Trawick, Roy Fielding git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85258 13f79535-47bb-0310-9956-ffa450edef68 --- server/mpm/dexter/dexter.c | 3 ++- server/mpm/mpmt_pthread/mpmt_pthread.c | 17 +++++++++++------ server/mpm/prefork/prefork.c | 1 + 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/server/mpm/dexter/dexter.c b/server/mpm/dexter/dexter.c index fb07fb1c6c..47c875c7d4 100644 --- a/server/mpm/dexter/dexter.c +++ b/server/mpm/dexter/dexter.c @@ -68,6 +68,7 @@ #include "http_connection.h" #include "ap_mpm.h" #include "unixd.h" +#include "mpm_common.h" #include "iol_socket.h" #include "ap_listen.h" #include "mpm_default.h" @@ -1022,7 +1023,7 @@ static void server_main_loop(int remaining_children_to_start) */ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, errno, ap_server_conf, - "long lost child came home! (pid %d)", pid); + "long lost child came home! (pid %d)", actual_pid); } /* Don't perform idle maintenance when a child dies, * only do it when there's a timeout. Remember only a diff --git a/server/mpm/mpmt_pthread/mpmt_pthread.c b/server/mpm/mpmt_pthread/mpmt_pthread.c index e8f1bf7cce..43bc6d224f 100644 --- a/server/mpm/mpmt_pthread/mpmt_pthread.c +++ b/server/mpm/mpmt_pthread/mpmt_pthread.c @@ -69,6 +69,7 @@ #include "http_connection.h" #include "ap_mpm.h" #include "unixd.h" +#include "mpm_common.h" #include "iol_socket.h" #include "ap_listen.h" #include "scoreboard.h" @@ -294,7 +295,7 @@ static void set_signals(void) #endif #ifdef SIGABORT if (sigaction(SIGABORT, &sa, NULL) < 0) - ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_ap_server_conf, "sigaction(SIGABORT)"); + ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGABORT)"); #endif #ifdef SIGABRT if (sigaction(SIGABRT, &sa, NULL) < 0) @@ -1047,11 +1048,15 @@ static void server_main_loop(int remaining_children_to_start) } else if (is_graceful) { /* Great, we've probably just lost a slot in the - * scoreboard. Somehow we don't know about this - * child. - */ - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, ap_server_conf, - "long lost child came home! (pid %d)", pid); + * scoreboard. Somehow we don't know about this child. + */ + ap_os_proc_t actual_pid; + + ap_get_os_proc(&actual_pid, pid); + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, + ap_server_conf, + "long lost child came home! (pid %ld)", + (long)actual_pid); } /* Don't perform idle maintenance when a child dies, * only do it when there's a timeout. Remember only a diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 458a252579..ec38b3dedd 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -101,6 +101,7 @@ #include "scoreboard.h" #include "ap_mpm.h" #include "unixd.h" +#include "mpm_common.h" #include "iol_socket.h" #include "ap_listen.h" #include "ap_mmn.h" -- 2.50.1