Automatically raise the core file size limit if CoreDumpDirectory is configured. --- httpd-2.4.1/server/core.c.orig 2012-02-22 00:09:24.000000000 +0100 +++ httpd-2.4.1/server/core.c 2012-02-22 00:15:07.329200901 +0100 @@ -4433,6 +4433,24 @@ } apr_pool_cleanup_register(pconf, NULL, ap_mpm_end_gen_helper, apr_pool_cleanup_null); +#ifdef RLIMIT_CORE + if (ap_coredumpdir_configured) { + struct rlimit lim; + + if (getrlimit(RLIMIT_CORE, &lim) == 0 && lim.rlim_cur == 0) { + lim.rlim_cur = lim.rlim_max; + if (setrlimit(RLIMIT_CORE, &lim) == 0) { + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL, + "core dump file size limit raised to %lu bytes", + lim.rlim_cur); + } else { + ap_log_error(APLOG_MARK, APLOG_NOTICE, errno, NULL, + "core dump file size is zero, setrlimit failed"); + } + } + } +#endif + return OK; }