2020-03-31 14:30:12 +00:00
|
|
|
diff --git a/server/core.c b/server/core.c
|
|
|
|
index 79b2a82..dc0f17a 100644
|
|
|
|
--- a/server/core.c
|
|
|
|
+++ b/server/core.c
|
|
|
|
@@ -4996,6 +4996,25 @@ static int core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte
|
2012-03-13 09:55:18 +00:00
|
|
|
}
|
|
|
|
apr_pool_cleanup_register(pconf, NULL, ap_mpm_end_gen_helper,
|
|
|
|
apr_pool_cleanup_null);
|
2004-09-09 06:16:56 +00:00
|
|
|
+
|
|
|
|
+#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;
|
|
|
|
}
|
|
|
|
|