Single Unix Specification and sniff test* of a few operating systems
says SIGFPE (floating point exception) results in a core, but we don't
install the sig_coredump handler for this signal along with SIGSEGV,
SIGILL, SIGBUS, etc.

Attached patch allows CoreDumpDirectory to work its magic in response to SIGFPE.

* looked at: AIX5.3, RHEL4, Solaris8, HPUX 11iv1,
--
Eric Covener
[EMAIL PROTECTED]
Index: server/mpm_common.c
===================================================================
--- server/mpm_common.c	(revision 500333)
+++ server/mpm_common.c	(working copy)
@@ -1187,6 +1187,10 @@
     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 @@
 #ifdef SIGILL
     apr_signal(SIGILL, sig_coredump);
 #endif /* SIGILL */
+#ifdef SIGFPE
+    apr_signal(SIGFPE, sig_coredump);
+#endif /* SIGILL */
 
 #endif /* NO_USE_SIGACTION */
 

Reply via email to