It seems to me that a lot of bug reports include the [para]phrase,
"I don't know where the core file is, I've looked everywhere!". So
how about the attached patch to tell 'em? As long as ap_snprintf
(or the OS snprintf, if ap_snprintf has been #defined to it) doesn't
complicate matters by faulting itself, I think this may make the
server appear friendlier.. It also changes the message to say it's
*attempting* to dump core, so we're covered if the OS is blocking
superuser-origin dumps.
#ken :-)}
Index: http_main.c
===================================================================
RCS file: /usr/users/coar/myApache/repository/apache/src/http_main.c,v
retrieving revision 1.133
diff -c -r1.133 http_main.c
*** 1.133 1997/03/22 23:51:02
--- http_main.c 1997/04/05 21:11:10
***************
*** 1239,1245 ****
}
void bus_error(void) {
! log_error("httpd: caught SIGBUS, dumping core", server_conf);
chdir(server_root);
abort();
exit(1);
--- 1239,1254 ----
}
void bus_error(void) {
! char emsg[256];
!
! ap_snprintf
! (
! emsg,
! sizeof(emsg) - 1,
! "httpd: caught SIGBUS, attempting to dump core in %s/core",
! server_root
! );
! log_error(emsg, server_conf);
chdir(server_root);
abort();
exit(1);
***************
*** 1246,1252 ****
}
void seg_fault() {
! log_error("httpd: caught SIGSEGV, dumping core", server_conf);
chdir(server_root);
abort();
exit(1);
--- 1255,1270 ----
}
void seg_fault() {
! char emsg[256];
!
! ap_snprintf
! (
! emsg,
! sizeof(emsg) - 1,
! "httpd: caught SIGSEGV, attempting to dump core in %s/core",
! server_root
! );
! log_error(emsg, server_conf);
chdir(server_root);
abort();
exit(1);
|