summaryrefslogtreecommitdiffstats
path: root/httpd-2.2.11-corelimit.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2010-10-01 18:09:27 +0200
committerRemi Collet <fedora@famillecollet.com>2010-10-01 18:09:27 +0200
commitb8a434bc812f9a44fa1ec05e735e57ef6ef74e01 (patch)
treec0424acf75b609c85103fa42bd90f7e600d2132f /httpd-2.2.11-corelimit.patch
import httpd 2.2.16
Diffstat (limited to 'httpd-2.2.11-corelimit.patch')
-rw-r--r--httpd-2.2.11-corelimit.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/httpd-2.2.11-corelimit.patch b/httpd-2.2.11-corelimit.patch
new file mode 100644
index 0000000..ea9f857
--- /dev/null
+++ b/httpd-2.2.11-corelimit.patch
@@ -0,0 +1,28 @@
+--- httpd-2.2.11/server/core.c.corelimit
++++ httpd-2.2.11/server/core.c
+@@ -3777,6 +3779,25 @@ static int core_post_config(apr_pool_t *
+
+ set_banner(pconf);
+ ap_setup_make_content_type(pconf);
++
++#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;
+ }
+