]> granicus.if.org Git - apache/commitdiff
Fix warnings on use of common prototypes. Fix bug of printing a
authorRoy T. Fielding <fielding@apache.org>
Fri, 19 May 2000 07:14:54 +0000 (07:14 +0000)
committerRoy T. Fielding <fielding@apache.org>
Fri, 19 May 2000 07:14:54 +0000 (07:14 +0000)
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
server/mpm/mpmt_pthread/mpmt_pthread.c
server/mpm/prefork/prefork.c

index fb07fb1c6ce8f1b269069c108d1f4a86b18844bd..47c875c7d41e3fa14d768573fb253b31efc42f24 100644 (file)
@@ -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
index e8f1bf7ccef032cad1b288b867443e2295eff1d2..43bc6d224f82bb1fdfcbea4712c164ce9842635b 100644 (file)
@@ -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
index 458a2525799c59319720c63a94d7364fc3cb2970..ec38b3dedd21683d7a36630a26412305d76ae88b 100644 (file)
 #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"