summaryrefslogtreecommitdiffstats
path: root/httpd-2.4.1-corelimit.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2012-03-24 08:24:02 +0100
committerRemi Collet <fedora@famillecollet.com>2012-03-24 08:24:02 +0100
commitc711ee8af9f094852c6d1917a0b111a276e7b320 (patch)
tree11e6d378e9e2c593854aee20b6efe0c2dbd483f9 /httpd-2.4.1-corelimit.patch
parentea8928fb799b042740b834100683ff3735575a84 (diff)
httpd: import from rawhide (version 2.4.1)
Diffstat (limited to 'httpd-2.4.1-corelimit.patch')
-rw-r--r--httpd-2.4.1-corelimit.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/httpd-2.4.1-corelimit.patch b/httpd-2.4.1-corelimit.patch
new file mode 100644
index 0000000..96f8486
--- /dev/null
+++ b/httpd-2.4.1-corelimit.patch
@@ -0,0 +1,35 @@
+
+Bump up the core size limit if CoreDumpDirectory is
+configured.
+
+Upstream-Status: Was discussed but there are competing desires;
+ there are portability oddities here too.
+
+--- httpd-2.4.1/server/core.c.corelimit
++++ httpd-2.4.1/server/core.c
+@@ -4433,6 +4433,25 @@ static int core_post_config(apr_pool_t *
+ }
+ 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;
+ }
+