From: Jeff Trawick Date: Thu, 11 Dec 2003 19:05:30 +0000 (+0000) Subject: fix a problem where a crash of a non-MPM child process could X-Git-Tag: pre_ajp_proxy~938 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a6bc964f2481ea9b21455ed5193a1b0e94c6e660;p=apache fix a problem where a crash of a non-MPM child process could result in an error log message stating that the parent had crashed the problem, which affected all *X platforms, was due to an attempt to support the general problem with linuxthreads; this change leaves us with a relatively obscure hole when running on linuxthreads (see comments) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102033 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm_common.c b/server/mpm_common.c index efaceaa739..f28ba74602 100644 --- a/server/mpm_common.c +++ b/server/mpm_common.c @@ -948,7 +948,14 @@ static void sig_coredump(int sig) #if AP_ENABLE_EXCEPTION_HOOK run_fatal_exception_hook(sig); #endif - if (my_pid == parent_pid) { + /* linuxthreads issue calling getpid() here: + * This comparison won't match if the crashing thread is + * some module's thread that runs in the parent process. + * The fallout, which is limited to linuxthreads: + * The special log message won't be written when such a + * thread in the parent causes the parent to crash. + */ + if (getpid() == parent_pid) { ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "seg fault or similar nasty error detected "