httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Blair Zajac <bl...@orcaware.com>
Subject Re: Apache 1.3.28 SEGFAULTS and doesn't produce a core file
Date Sun, 30 Nov 2003 06:15:29 GMT
Won't doing something like this work on Linux?

--- src/main/http_main.c.0      2002-09-27 10:40:24.000000000 -0700
+++ src/main/http_main.c        2003-06-26 17:11:35.000000000 -0700
@@ -123,6 +123,7 @@
 #ifdef HAVE_BSTRING_H
 #include <bstring.h>           /* for IRIX, FD_SET calls bzero() */
 #endif
+#include <sys/prctl.h>

 #ifdef MULTITHREAD
 /* special debug stuff -- PCS */
@@ -4261,6 +4262,17 @@
     }
 #endif

+    if (strlen(ap_coredump_dir)) {
+        if (prctl(PR_SET_DUMPABLE, 1)) {
+            ap_log_error(APLOG_MARK, APLOG_ALERT, server_conf,
+                         "set dumpable failed - this child will not coredump"
+                         " after software errors");
+       } else {
+            ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, server_conf,
+                         "set dumpable succeeded");
+       }
+    }
+
     ap_child_init_modules(pchild, server_conf);

     /* done with the initialization critical section */

There's a similar call to prctl(PR_SET_DUMPABLE, 1) in the http
2.0 tree.

Best,
Blair

-- 
Blair Zajac <blair@orcaware.com>
Plots of your system's performance - http://www.orcaware.com/orca/

Mime
View raw message