2 Bump up the core size limit if CoreDumpDirectory is
5 Upstream-Status: Was discussed but there are competing desires;
6 there are portability oddities here too.
8 --- httpd-2.4.1/server/core.c.corelimit
9 +++ httpd-2.4.1/server/core.c
10 @@ -4433,6 +4433,25 @@ static int core_post_config(apr_pool_t *
12 apr_pool_cleanup_register(pconf, NULL, ap_mpm_end_gen_helper,
13 apr_pool_cleanup_null);
16 + if (ap_coredumpdir_configured) {
19 + if (getrlimit(RLIMIT_CORE, &lim) == 0 && lim.rlim_cur == 0) {
20 + lim.rlim_cur = lim.rlim_max;
21 + if (setrlimit(RLIMIT_CORE, &lim) == 0) {
22 + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
23 + "core dump file size limit raised to %lu bytes",
26 + ap_log_error(APLOG_MARK, APLOG_NOTICE, errno, NULL,
27 + "core dump file size is zero, setrlimit failed");