Blame httpd-2.2.11-corelimit.patch
|
|
110f0ad |
--- httpd-2.2.11/server/core.c.corelimit
|
|
|
110f0ad |
+++ httpd-2.2.11/server/core.c
|
|
|
110f0ad |
@@ -3777,6 +3779,25 @@ static int core_post_config(apr_pool_t *
|
|
cvsdist |
6356941 |
|
|
|
110f0ad |
set_banner(pconf);
|
|
cvsdist |
6356941 |
ap_setup_make_content_type(pconf);
|
|
cvsdist |
6356941 |
+
|
|
cvsdist |
6356941 |
+#ifdef RLIMIT_CORE
|
|
cvsdist |
6356941 |
+ if (ap_coredumpdir_configured) {
|
|
cvsdist |
6356941 |
+ struct rlimit lim;
|
|
cvsdist |
6356941 |
+
|
|
cvsdist |
6356941 |
+ if (getrlimit(RLIMIT_CORE, &lim) == 0 && lim.rlim_cur == 0) {
|
|
cvsdist |
6356941 |
+ lim.rlim_cur = lim.rlim_max;
|
|
cvsdist |
6356941 |
+ if (setrlimit(RLIMIT_CORE, &lim) == 0) {
|
|
cvsdist |
6356941 |
+ ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
|
|
cvsdist |
6356941 |
+ "core dump file size limit raised to %lu bytes",
|
|
cvsdist |
6356941 |
+ lim.rlim_cur);
|
|
cvsdist |
6356941 |
+ } else {
|
|
cvsdist |
6356941 |
+ ap_log_error(APLOG_MARK, APLOG_NOTICE, errno, NULL,
|
|
cvsdist |
6356941 |
+ "core dump file size is zero, setrlimit failed");
|
|
cvsdist |
6356941 |
+ }
|
|
cvsdist |
6356941 |
+ }
|
|
cvsdist |
6356941 |
+ }
|
|
cvsdist |
6356941 |
+#endif
|
|
cvsdist |
6356941 |
+
|
|
cvsdist |
6356941 |
return OK;
|
|
cvsdist |
6356941 |
}
|
|
cvsdist |
6356941 |
|