]> granicus.if.org Git - apache/commitdiff
Move process_child_status to mpm_common.c. This requires re-naming it
authorRyan Bloom <rbb@apache.org>
Mon, 10 Jul 2000 18:21:24 +0000 (18:21 +0000)
committerRyan Bloom <rbb@apache.org>
Mon, 10 Jul 2000 18:21:24 +0000 (18:21 +0000)
to ap_process_child_status and opening up ap_coredump_dir.  I have
modified all of the MPMs that I saw using this function to work with this
patch.  Sorry if I broke anybody.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85808 13f79535-47bb-0310-9956-ffa450edef68

14 files changed:
include/mpm_common.h
server/mpm/beos/beos.c
server/mpm/beos/mpm.h
server/mpm/dexter/dexter.c
server/mpm/dexter/mpm.h
server/mpm/mpmt_beos/mpm.h
server/mpm/mpmt_beos/mpmt_beos.c
server/mpm/mpmt_pthread/mpm.h
server/mpm/mpmt_pthread/mpmt_pthread.c
server/mpm/prefork/mpm.h
server/mpm/prefork/prefork.c
server/mpm/spmt_os2/mpm.h
server/mpm/spmt_os2/spmt_os2.c
server/mpm_common.c

index 6611c02a5c6cbcfa3fa2a30d9badbc3bce3c5b34..148b807f9fd552efe5d1edfeab31ee706e6e204b 100644 (file)
@@ -76,6 +76,7 @@ extern "C" {
 
 void ap_reclaim_child_processes(int terminate);
 void ap_wait_or_timeout(ap_wait_t *status, ap_proc_t *ret, ap_pool_t *p);
+void ap_process_child_status(ap_proc_t *pid, ap_wait_t status);
 
 #define AP_MPM_HARD_LIMITS_FILE "src/" APACHE_MPM_DIR "/mpm_default.h"
 
index c4c7041f42e40bd6ff54d481d89c5d0f94ad7ebc..13abfa0731d8e731013c7a3c4fe3e0770c79aed1 100644 (file)
@@ -1,4 +1,4 @@
-/* ====================================================================
+ap_/* ====================================================================
  * The Apache Software License, Version 1.1
  *
  * Copyright (c) 2000 The Apache Software Foundation.  All rights
@@ -126,7 +126,7 @@ struct ap_ctable ap_child_table[HARD_SERVER_LIMIT];
  */
 int ap_max_child_assigned = -1;
 int ap_max_threads_limit = -1;
-static char ap_coredump_dir[MAX_STRING_LEN];
+char ap_coredump_dir[MAX_STRING_LEN];
 static port_id port_of_death;
 
 /* shared http_main globals... */
@@ -289,57 +289,6 @@ static void set_signals(void)
            ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGWINCH)");
 }
 
-static void process_child_status(int pid, ap_wait_t status)
-{
-    /* Child died... if it died due to a fatal error,
-       * we should simply bail out.
-       */
-    if ((WIFEXITED(status)) &&
-       WEXITSTATUS(status) == APEXIT_CHILDFATAL) {
-       ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_NOERRNO, 0, ap_server_conf,
-                       "Child %d returned a Fatal error... \n"
-                       "Apache is exiting!",
-                       pid);
-       exit(APEXIT_CHILDFATAL);
-    }
-    if (WIFSIGNALED(status)) {
-       switch (WTERMSIG(status)) {
-       case SIGTERM:
-       case SIGHUP:
-       case SIGUSR1:
-       case SIGKILL:
-           break;
-       default:
-#ifdef SYS_SIGLIST
-#ifdef WCOREDUMP
-           if (WCOREDUMP(status)) {
-               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
-                            0, ap_server_conf,
-                            "child pid %d exit signal %s (%d), "
-                            "possible coredump in %s",
-                            pid, (WTERMSIG(status) >= NumSIG) ? "" : 
-                            SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status),
-                            ap_coredump_dir);
-           }
-           else {
-#endif
-               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
-                            0, ap_server_conf,
-                            "child pid %d exit signal %s (%d)", pid,
-                            SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status));
-#ifdef WCOREDUMP
-           }
-#endif
-#else
-           ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
-                        0, ap_server_conf,
-                        "child pid %d exit signal %d",
-                        pid, WTERMSIG(status));
-#endif
-       }
-    }
-}
-
 static int setup_listeners(server_rec *s)
 {
     ap_listen_rec *lr;
@@ -664,7 +613,7 @@ static void server_main_loop(int remaining_threads_to_start)
         ap_wait_or_timeout(&status, &pid, pconf);
          
         if (pid.pid >= 0) {
-            process_child_status(pid.pid, status);
+            ap_process_child_status(pid.pid, status);
             /* non-fatal death... note that it's gone in the scoreboard. */
             child_slot = -1;
             for (i = 0; i < ap_max_child_assigned; ++i) {
index af4e2377772e9f45fd545111fe7a1b44ba3b98f0..e792f0cd3d9e2d7516c9feff5f59999021322ac0 100644 (file)
@@ -74,6 +74,6 @@ typedef struct ap_ctable{
 
 extern ap_ctable ap_child_table[HARD_SERVER_LIMIT];
 extern server_rec *ap_server_conf;
-
+extern char ap_coredump_dir[MAX_STRING_LEN];
 
 #endif /* APACHE_MPM_BEOS_H */
index 1faf0bca4a0f7cb490198d39865b9fea02507dcb..345891a372a21dd5fabf0d6001714c26bcc59130 100644 (file)
@@ -118,7 +118,7 @@ struct ap_ctable ap_child_table[HARD_SERVER_LIMIT];
  */
 int ap_max_daemons_limit = -1;
 
-static char ap_coredump_dir[MAX_STRING_LEN];
+char ap_coredump_dir[MAX_STRING_LEN];
 
 static ap_file_t *pipe_of_death_in = NULL;
 static ap_file_t *pipe_of_death_out = NULL;
@@ -376,58 +376,6 @@ static void set_signals(void)
 #endif
 }
 
-static void process_child_status(ap_proc_t *pid, ap_wait_t status)
-{
-    /* Child died... if it died due to a fatal error,
-       * we should simply bail out.
-       */
-    if ((WIFEXITED(status)) &&
-       WEXITSTATUS(status) == APEXIT_CHILDFATAL) {
-       ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_NOERRNO, 0, ap_server_conf,
-                       "Child %ld returned a Fatal error... \n"
-                       "Apache is exiting!",
-                       (long)pid->pid);
-       exit(APEXIT_CHILDFATAL);
-    }
-    if (WIFSIGNALED(status)) {
-       switch (WTERMSIG(status)) {
-       case SIGTERM:
-       case SIGHUP:
-       case SIGUSR1:
-       case SIGKILL:
-           break;
-       default:
-#ifdef SYS_SIGLIST
-#ifdef WCOREDUMP
-           if (WCOREDUMP(status)) {
-               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0,
-                            ap_server_conf,
-                            "child pid %ld exit signal %s (%d), "
-                            "possible coredump in %s",
-                            (long)pid->pid, (WTERMSIG(status) >= NumSIG) ? "" :
-                            SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status),
-                            ap_coredump_dir);
-           }
-           else {
-#endif
-               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0,
-                            ap_server_conf,
-                            "child pid %ld exit signal %s (%d)", 
-                             (long)pid->pid,
-                            SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status));
-#ifdef WCOREDUMP
-           }
-#endif
-#else
-           ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0,
-                        ap_server_conf,
-                        "child pid %ld exit signal %d",
-                        (long)pid->pid, WTERMSIG(status));
-#endif
-       }
-    }
-}
-
 static int setup_listeners(server_rec *s)
 {
     ap_listen_rec *lr;
@@ -988,7 +936,7 @@ static void server_main_loop(int remaining_children_to_start)
         ap_wait_or_timeout(&status, &pid, pconf);
         
         if (pid.pid != -1) {
-            process_child_status(&pid, status);
+            ap_process_child_status(&pid, status);
             /* non-fatal death... note that it's gone in the child table and
              * clean out the status table. */
             child_slot = -1;
index e950de3f29cc8843d2bfb11f8978557bb30236c9..ffcccc122c116283f6d7a8f75bbd7e1e3f9f4ed2 100644 (file)
@@ -78,4 +78,6 @@ typedef struct ap_ctable{
 extern int ap_max_daemons_limit;
 extern ap_ctable ap_child_table[HARD_SERVER_LIMIT];
 extern server_rec *ap_server_conf;
+extern char ap_coredump_dir[MAX_STRING_LEN];
+
 #endif /* APACHE_MPM_DEXTER_H */
index c2e59f1a9ca94f53feae0a9152736bb3e7e48d94..486c8d898164a5379edd6e9f594eec306c012e4a 100644 (file)
@@ -74,5 +74,6 @@ typedef struct ap_ctable{
 extern int ap_max_daemons_limit;
 extern ap_ctable ap_child_table[HARD_SERVER_LIMIT];
 extern server_rec *ap_server_conf;
+extern char ap_coredump_dir[MAX_STRING_LEN];
 
 #endif /* APACHE_MPM_MPMT_BEOS_H */
index 2421bf06f6882afcc585c48e161397776f23be1d..f00ed2cf724afab21e7b18de086be9a78ab05c9a 100644 (file)
@@ -125,7 +125,7 @@ struct ap_ctable ap_child_table[HARD_SERVER_LIMIT];
  * value to optimize routines that have to scan the entire scoreboard.
  */
 int ap_max_daemons_limit = -1;
-static char ap_coredump_dir[MAX_STRING_LEN];
+char ap_coredump_dir[MAX_STRING_LEN];
 port_id port_of_death;
 
 /* shared http_main globals... */
@@ -277,57 +277,6 @@ static void set_signals(void)
            ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGWINCH)");
 }
 
-static void process_child_status(int pid, ap_wait_t status)
-{
-    /* Child died... if it died due to a fatal error,
-       * we should simply bail out.
-       */
-    if ((WIFEXITED(status)) &&
-       WEXITSTATUS(status) == APEXIT_CHILDFATAL) {
-       ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_NOERRNO, errno, ap_server_conf,
-                       "Child %d returned a Fatal error... \n"
-                       "Apache is exiting!",
-                       pid);
-       exit(APEXIT_CHILDFATAL);
-    }
-    if (WIFSIGNALED(status)) {
-       switch (WTERMSIG(status)) {
-       case SIGTERM:
-       case SIGHUP:
-       case SIGUSR1:
-       case SIGKILL:
-           break;
-       default:
-#ifdef SYS_SIGLIST
-#ifdef WCOREDUMP
-           if (WCOREDUMP(status)) {
-               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
-                            errno, ap_server_conf,
-                            "child pid %d exit signal %s (%d), "
-                            "possible coredump in %s",
-                            pid, (WTERMSIG(status) >= NumSIG) ? "" : 
-                            SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status),
-                            ap_coredump_dir);
-           }
-           else {
-#endif
-               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
-                            errno, ap_server_conf,
-                            "child pid %d exit signal %s (%d)", pid,
-                            SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status));
-#ifdef WCOREDUMP
-           }
-#endif
-#else
-           ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
-                        errno, ap_server_conf,
-                        "child pid %d exit signal %d",
-                        pid, WTERMSIG(status));
-#endif
-       }
-    }
-}
-
 static int setup_listeners(server_rec *s)
 {
     ap_listen_rec *lr;
@@ -695,7 +644,7 @@ static void server_main_loop(int remaining_children_to_start)
         ap_wait_or_timeout(&status, &pid, pconf);
         
         if (pid.pid >= 0) {
-            process_child_status(pid.pid, status);
+            ap_process_child_status(pid.pid, status);
             /* non-fatal death... note that it's gone in the scoreboard. */
             child_slot = -1;
             for (i = 0; i < ap_max_daemons_limit; ++i) {
index c9319c03eb966f01a5fa50b59e7d7e47ab93051a..ba1d08581bf7841b0803e405a8d0d24a24182784 100644 (file)
@@ -71,5 +71,6 @@ extern unsigned int ap_my_pid;
 extern server_rec *ap_server_conf;
 extern scoreboard *ap_scoreboard_image;
 extern void clean_child_exit(int);
+extern char ap_coredump_dir[MAX_STRING_LEN];
 
 #endif /* APACHE_MPM_MPMT_PTHREAD_H */
index 69cdfbb2e0c9fa04911392df4c25acc71f030e23..287351d546e22b156a5702d8b52b43c64311b3a7 100644 (file)
@@ -121,7 +121,7 @@ typedef struct {
  */
 int ap_max_daemons_limit = -1;
 
-static char ap_coredump_dir[MAX_STRING_LEN];
+char ap_coredump_dir[MAX_STRING_LEN];
 
 static ap_file_t *pipe_of_death_in = NULL;
 static ap_file_t *pipe_of_death_out = NULL;
@@ -373,58 +373,6 @@ static void set_signals(void)
 #endif
 }
 
-static void process_child_status(ap_proc_t *pid, ap_wait_t status)
-{
-    /* Child died... if it died due to a fatal error,
-       * we should simply bail out.
-       */
-    if ((WIFEXITED(status)) &&
-       WEXITSTATUS(status) == APEXIT_CHILDFATAL) {
-       ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_NOERRNO, 0, ap_server_conf,
-                       "Child %ld returned a Fatal error... \n"
-                       "Apache is exiting!",
-                       (long)pid->pid);
-       exit(APEXIT_CHILDFATAL);
-    }
-    if (WIFSIGNALED(status)) {
-       switch (WTERMSIG(status)) {
-       case SIGTERM:
-       case SIGHUP:
-       case SIGUSR1:
-       case SIGKILL:
-           break;
-       default:
-#ifdef SYS_SIGLIST
-#ifdef WCOREDUMP
-           if (WCOREDUMP(status)) {
-               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
-                            0, ap_server_conf,
-                            "child pid %ld exit signal %s (%d), "
-                            "possible coredump in %s",
-                            (long)pid->pid, (WTERMSIG(status) >= NumSIG) ? "" :
-                            SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status),
-                            ap_coredump_dir);
-           }
-           else {
-#endif
-               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
-                            0, ap_server_conf,
-                            "child pid %ld exit signal %s (%d)", 
-                             (long)pid->pid,
-                            SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status));
-#ifdef WCOREDUMP
-           }
-#endif
-#else
-           ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
-                        0, ap_server_conf,
-                        "child pid %ld exit signal %d",
-                        (long)pid->pid, WTERMSIG(status));
-#endif
-       }
-    }
-}
-
 static int setup_listeners(server_rec *s)
 {
     ap_listen_rec *lr;
@@ -1022,7 +970,7 @@ static void server_main_loop(int remaining_children_to_start)
         ap_wait_or_timeout(&status, &pid, pconf);
         
         if (pid.pid != -1) {
-            process_child_status(&pid, status);
+            ap_process_child_status(&pid, status);
             /* non-fatal death... note that it's gone in the scoreboard. */
             child_slot = find_child_by_pid(&pid);
             if (child_slot >= 0) {
index 2d45e743c86028212daeb0ff144ccc9378117bc8..c912aa06d17b289251bd75f430a6344d39a02efb 100644 (file)
@@ -70,4 +70,5 @@ extern int ap_max_daemons_limit;
 extern scoreboard *ap_scoreboard_image;
 extern server_rec *ap_server_conf;
 extern int ap_my_pid;
+extern char ap_coredump_dir[MAX_STRING_LEN];
 #endif /* APACHE_MPM_DEXTER_H */
index 555227df31b91fc5e0eb8a6d96a7c403943a3221..894e0c990a4d507a42bbd449340132d74d8e3a87 100644 (file)
@@ -156,7 +156,7 @@ static int maintain_connection_status = 1;
 int ap_max_daemons_limit = -1;
 server_rec *ap_server_conf;
 
-static char ap_coredump_dir[MAX_STRING_LEN];
+char ap_coredump_dir[MAX_STRING_LEN];
 
 /* *Non*-shared http_main globals... */
 
@@ -1283,59 +1283,6 @@ static void perform_idle_server_maintenance(void)
     }
 }
 
-
-static void process_child_status(ap_proc_t *pid, ap_wait_t status)
-{
-    /* Child died... if it died due to a fatal error,
-       * we should simply bail out.
-       */
-    if ((WIFEXITED(status)) &&
-       WEXITSTATUS(status) == APEXIT_CHILDFATAL) {
-       ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_NOERRNO, 0, ap_server_conf,
-                       "Child %ld returned a Fatal error... \n"
-                       "Apache is exiting!",
-                       (long)pid->pid);
-       exit(APEXIT_CHILDFATAL);
-    }
-    if (WIFSIGNALED(status)) {
-       switch (WTERMSIG(status)) {
-       case SIGTERM:
-       case SIGHUP:
-       case SIGUSR1:
-       case SIGKILL:
-           break;
-       default:
-#ifdef SYS_SIGLIST
-#ifdef WCOREDUMP
-           if (WCOREDUMP(status)) {
-               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
-                            0, ap_server_conf,
-                            "child pid %ld exit signal %s (%d), "
-                            "possible coredump in %s",
-                            (long)pid->pid, (WTERMSIG(status) >= NumSIG) ? "" : 
-                            SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status),
-                            ap_coredump_dir);
-           }
-           else {
-#endif
-               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
-                            0, ap_server_conf,
-                            "child pid %ld exit signal %s (%d)", (long)pid->pid,
-                            SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status));
-#ifdef WCOREDUMP
-           }
-#endif
-#else
-           ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
-                        0, ap_server_conf,
-                        "child pid %ld exit signal %d",
-                        (long)pid->pid, WTERMSIG(status));
-#endif
-       }
-    }
-}
-
-
 static int setup_listeners(server_rec *s)
 {
     ap_listen_rec *lr;
@@ -1453,7 +1400,7 @@ int ap_mpm_run(ap_pool_t *_pconf, ap_pool_t *plog, server_rec *s)
         * extra child
         */
        if (pid.pid != -1) {
-           process_child_status(&pid, status);
+           ap_process_child_status(&pid, status);
            /* non-fatal death... note that it's gone in the scoreboard. */
            ap_sync_scoreboard_image();
            child_slot = find_child_by_pid(&pid);
index 1170c28364c04417b8bea56c2dd4e681c17de1f4..0931a4b35b7e8ec7c4654a9b150928cf137ca82a 100644 (file)
@@ -65,4 +65,6 @@
 
 #define SPMT_OS2_MPM
 
+extern char ap_coredump_dir[MAX_STRING_LEN];
+
 #endif /* APACHE_MPM_DEXTER_H */
index 65d34a2138461f98796dd1c2ecb29c510bc98a3b..9ca01bcad0e13978ec8bb0c2ff7a536ee3ed0123 100644 (file)
@@ -100,7 +100,7 @@ static int ap_extended_status = 0;
  */
 static int max_daemons_limit = -1;
 
-static char ap_coredump_dir[MAX_STRING_LEN];
+char ap_coredump_dir[MAX_STRING_LEN];
 
 /* *Non*-shared http_main globals... */
 
@@ -1201,58 +1201,6 @@ static void perform_idle_server_maintenance(void)
 }
 
 
-static void process_child_status(int tid, ap_wait_t status)
-{
-    /* Child died... if it died due to a fatal error,
-       * we should simply bail out.
-       */
-    if ((WIFEXITED(status)) &&
-       WEXITSTATUS(status) == APEXIT_CHILDFATAL) {
-       ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_NOERRNO, 0, server_conf,
-                       "Child %d returned a Fatal error... \n"
-                       "Apache is exiting!",
-                       tid);
-       exit(APEXIT_CHILDFATAL);
-    }
-    if (WIFSIGNALED(status)) {
-       switch (WTERMSIG(status)) {
-       case SIGTERM:
-       case SIGHUP:
-       case SIGUSR1:
-       case SIGKILL:
-           break;
-       default:
-#ifdef SYS_SIGLIST
-#ifdef WCOREDUMP
-           if (WCOREDUMP(status)) {
-               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0,
-                            server_conf,
-                            "child tid %d exit signal %s (%d), "
-                            "possible coredump in %s",
-                            tid, (WTERMSIG(status) >= NumSIG) ? "" :
-                            SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status),
-                            ap_coredump_dir);
-           }
-           else {
-#endif
-               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0,
-                            server_conf,
-                            "child tid %d exit signal %s (%d)", tid,
-                            SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status));
-#ifdef WCOREDUMP
-           }
-#endif
-#else
-           ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0,
-                        server_conf,
-                        "child tid %d exit signal %d",
-                        tid, WTERMSIG(status));
-#endif
-       }
-    }
-}
-
-
 /*****************************************************************
  * Executive routines.
  */
@@ -1333,7 +1281,7 @@ int ap_mpm_run(ap_pool_t *_pconf, ap_pool_t *plog, server_rec *s)
         * extra child
         */
        if (tid >= 0) {
-           process_child_status(tid, status);
+           ap_process_child_status(tid, status);
            /* non-fatal death... note that it's gone in the scoreboard. */
            child_slot = find_child_by_tid(tid);
            if (child_slot >= 0) {
index 3613ccaa0ee18398022f30f40f2947e1d5222f66..9f2923a843990165cc05d6a9d2d21105d13cb136 100644 (file)
@@ -224,4 +224,56 @@ void ap_wait_or_timeout(ap_wait_t *status, ap_proc_t *ret, ap_pool_t *p)
     return;
 }
 
+void ap_process_child_status(ap_proc_t *pid, ap_wait_t status)
+{
+    /* Child died... if it died due to a fatal error,
+        * we should simply bail out.
+        */
+    if ((WIFEXITED(status)) &&
+        WEXITSTATUS(status) == APEXIT_CHILDFATAL) {
+        ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_NOERRNO, 0, ap_server_conf,
+                        "Child %ld returned a Fatal error... \n"
+                        "Apache is exiting!",
+                        (long)pid->pid);
+        exit(APEXIT_CHILDFATAL);
+    }
+    if (WIFSIGNALED(status)) {
+        switch (WTERMSIG(status)) {
+        case SIGTERM:
+        case SIGHUP:
+        case SIGUSR1:
+        case SIGKILL:
+            break;
+        default:
+#ifdef SYS_SIGLIST
+#ifdef WCOREDUMP
+            if (WCOREDUMP(status)) {
+                ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
+                             0, ap_server_conf,
+                             "child pid %ld exit signal %s (%d), "
+                             "possible coredump in %s",
+                             (long)pid->pid, (WTERMSIG(status) >= NumSIG) ? "" :
+                             SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status),
+                             ap_coredump_dir);
+            }
+            else {
+#endif
+                ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
+                             0, ap_server_conf,
+                             "child pid %ld exit signal %s (%d)",
+                             (long)pid->pid,
+                             SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status));
+#ifdef WCOREDUMP
+            }
+#endif
+#else
+            ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
+                         0, ap_server_conf,
+                         "child pid %ld exit signal %d",
+                         (long)pid->pid, WTERMSIG(status));
+#endif
+        }
+    }
+}
+