Blame SOURCES/httpd-2.4.1-corelimit.patch
|
|
008793 |
|
|
|
008793 |
Bump up the core size limit if CoreDumpDirectory is
|
|
|
008793 |
configured.
|
|
|
008793 |
|
|
|
008793 |
Upstream-Status: Was discussed but there are competing desires;
|
|
|
008793 |
there are portability oddities here too.
|
|
|
008793 |
|
|
|
008793 |
--- httpd-2.4.1/server/core.c.corelimit
|
|
|
008793 |
+++ httpd-2.4.1/server/core.c
|
|
|
008793 |
@@ -4433,6 +4433,25 @@ static int core_post_config(apr_pool_t *
|
|
|
008793 |
}
|
|
|
008793 |
apr_pool_cleanup_register(pconf, NULL, ap_mpm_end_gen_helper,
|
|
|
008793 |
apr_pool_cleanup_null);
|
|
|
008793 |
+
|
|
|
008793 |
+#ifdef RLIMIT_CORE
|
|
|
008793 |
+ if (ap_coredumpdir_configured) {
|
|
|
008793 |
+ struct rlimit lim;
|
|
|
008793 |
+
|
|
|
008793 |
+ if (getrlimit(RLIMIT_CORE, &lim) == 0 && lim.rlim_cur == 0) {
|
|
|
008793 |
+ lim.rlim_cur = lim.rlim_max;
|
|
|
008793 |
+ if (setrlimit(RLIMIT_CORE, &lim) == 0) {
|
|
|
008793 |
+ ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
|
|
|
008793 |
+ "core dump file size limit raised to %lu bytes",
|
|
|
008793 |
+ lim.rlim_cur);
|
|
|
008793 |
+ } else {
|
|
|
008793 |
+ ap_log_error(APLOG_MARK, APLOG_NOTICE, errno, NULL,
|
|
|
008793 |
+ "core dump file size is zero, setrlimit failed");
|
|
|
008793 |
+ }
|
|
|
008793 |
+ }
|
|
|
008793 |
+ }
|
|
|
008793 |
+#endif
|
|
|
008793 |
+
|
|
|
008793 |
return OK;
|
|
|
008793 |
}
|
|
|
008793 |
|