diff options
author | cvsdist <cvsdist@fedoraproject.org> | 2004-09-09 06:16:56 +0000 |
---|---|---|
committer | cvsdist <cvsdist@fedoraproject.org> | 2004-09-09 06:16:56 +0000 |
commit | 6356941d7174ac4cb94ba9bb2d6fe71849128384 (patch) | |
tree | 3f11caf9a87b927bf781f7c08f7a72065718bec2 /httpd-2.0.48-corelimit.patch | |
parent | 2d6a2e5261dd79b1fb2f32ead440dd0425582a75 (diff) | |
download | httpd-FC-2-split.tar.gz httpd-FC-2-split.tar.xz httpd-FC-2-split.zip |
auto-import httpd-2.0.48-10 from httpd-2.0.48-10.src.rpmhttpd-2_0_48-10FC-2-split
Diffstat (limited to 'httpd-2.0.48-corelimit.patch')
-rw-r--r-- | httpd-2.0.48-corelimit.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/httpd-2.0.48-corelimit.patch b/httpd-2.0.48-corelimit.patch new file mode 100644 index 0000000..1496b4b --- /dev/null +++ b/httpd-2.0.48-corelimit.patch @@ -0,0 +1,32 @@ + +Automatically raise the core file size limit if CoreDumpDirectory +is configured. + +--- httpd-2.0.48/server/core.c.corelimit ++++ httpd-2.0.48/server/core.c +@@ -4233,6 +4233,25 @@ + + ap_set_version(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; + } + |