]> git.pld-linux.org Git - packages/apache.git/blame - httpd-2.0.48-corelimit.patch
- up to 2.4.59
[packages/apache.git] / httpd-2.0.48-corelimit.patch
CommitLineData
0e467b1f
AM
1
2Automatically raise the core file size limit if CoreDumpDirectory
3is configured.
4
7ed09ac4
ER
5--- httpd-2.0.48/server/core.c.corelimit
6+++ httpd-2.0.48/server/core.c
10549188 7@@ -4424,6 +4424,25 @@
0e467b1f 8 ap_setup_make_content_type(pconf);
10549188 9 ap_setup_auth_internal(ptemp);
65c3248e 10 ap_setup_ssl_optional_fns(pconf);
0e467b1f
AM
11+
12+#ifdef RLIMIT_CORE
13+ if (ap_coredumpdir_configured) {
14+ struct rlimit lim;
15+
16+ if (getrlimit(RLIMIT_CORE, &lim) == 0 && lim.rlim_cur == 0) {
17+ lim.rlim_cur = lim.rlim_max;
18+ if (setrlimit(RLIMIT_CORE, &lim) == 0) {
19+ ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
20+ "core dump file size limit raised to %lu bytes",
21+ lim.rlim_cur);
22+ } else {
23+ ap_log_error(APLOG_MARK, APLOG_NOTICE, errno, NULL,
24+ "core dump file size is zero, setrlimit failed");
25+ }
26+ }
27+ }
28+#endif
29+
10549188
AM
30 if (!sys_privileges) {
31 ap_log_error(APLOG_MARK, APLOG_CRIT, 0, NULL, APLOGNO(00136)
32 "Server MUST relinquish startup privileges before "
33
This page took 0.114379 seconds and 4 git commands to generate.