From 97b575accbb25747cf21addbd089a223fd4eaf1c Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Sun, 28 Jan 2007 21:14:40 +0000 Subject: [PATCH] Unix MPMs: Catch SIGFPE so that exception hooks and CoreDumpDirectory can work after that terminating signal. Submitted by: Eric Covener Reviewed by: trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@500881 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 4 ++++ server/mpm_common.c | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGES b/CHANGES index 897f494e45..10d3e58e87 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,10 @@ Changes with Apache 2.3.0 [Remove entries to the current 2.0 and 2.2 section below, when backported] + *) Unix MPMs: Catch SIGFPE so that exception hooks and CoreDumpDirectory + can work after that terminating signal. + [Eric Covener ] + *) mod_dbd: Create memory sub-pools for each DB connection and close DB connections in a pool cleanup function. Ensure prepared statements are destroyed before DB connection is closed. When using reslists, diff --git a/server/mpm_common.c b/server/mpm_common.c index ac85bb087b..bd2cda8ec7 100644 --- a/server/mpm_common.c +++ b/server/mpm_common.c @@ -1187,6 +1187,10 @@ apr_status_t ap_fatal_signal_setup(server_rec *s, apr_pool_t *in_pconf) if (sigaction(SIGILL, &sa, NULL) < 0) ap_log_error(APLOG_MARK, APLOG_WARNING, errno, s, "sigaction(SIGILL)"); #endif +#ifdef SIGFPE + if (sigaction(SIGFPE, &sa, NULL) < 0) + ap_log_error(APLOG_MARK, APLOG_WARNING, errno, s, "sigaction(SIGFPE)"); +#endif #else /* NO_USE_SIGACTION */ @@ -1203,6 +1207,9 @@ apr_status_t ap_fatal_signal_setup(server_rec *s, apr_pool_t *in_pconf) #ifdef SIGILL apr_signal(SIGILL, sig_coredump); #endif /* SIGILL */ +#ifdef SIGFPE + apr_signal(SIGFPE, sig_coredump); +#endif /* SIGILL */ #endif /* NO_USE_SIGACTION */ -- 2.50.1