diff options
Diffstat (limited to 'meta-webserver/recipes-httpd/apache2/apache2/0002-apache2-bump-up-the-core-size-limit-if-CoreDumpDirec.patch')
-rw-r--r-- | meta-webserver/recipes-httpd/apache2/apache2/0002-apache2-bump-up-the-core-size-limit-if-CoreDumpDirec.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/0002-apache2-bump-up-the-core-size-limit-if-CoreDumpDirec.patch b/meta-webserver/recipes-httpd/apache2/apache2/0002-apache2-bump-up-the-core-size-limit-if-CoreDumpDirec.patch new file mode 100644 index 000000000..85fe6ae4b --- /dev/null +++ b/meta-webserver/recipes-httpd/apache2/apache2/0002-apache2-bump-up-the-core-size-limit-if-CoreDumpDirec.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From 7df207ad4d0dcda2ad36e5642296e0dec7e13647 Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
3 | Date: Tue, 17 Jul 2012 11:27:39 +0100 | ||
4 | Subject: [PATCH] apache2: bump up the core size limit if CoreDumpDirectory | ||
5 | is configured | ||
6 | |||
7 | Bump up the core size limit if CoreDumpDirectory is | ||
8 | configured. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Note: upstreaming was discussed but there are competing desires; | ||
13 | there are portability oddities here too. | ||
14 | |||
15 | --- | ||
16 | server/core.c | 19 +++++++++++++++++++ | ||
17 | 1 file changed, 19 insertions(+) | ||
18 | |||
19 | diff --git a/server/core.c b/server/core.c | ||
20 | index eacb54f..7aa841f 100644 | ||
21 | --- a/server/core.c | ||
22 | +++ b/server/core.c | ||
23 | @@ -4965,6 +4965,25 @@ static int core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte | ||
24 | } | ||
25 | apr_pool_cleanup_register(pconf, NULL, ap_mpm_end_gen_helper, | ||
26 | apr_pool_cleanup_null); | ||
27 | + | ||
28 | +#ifdef RLIMIT_CORE | ||
29 | + if (ap_coredumpdir_configured) { | ||
30 | + struct rlimit lim; | ||
31 | + | ||
32 | + if (getrlimit(RLIMIT_CORE, &lim) == 0 && lim.rlim_cur == 0) { | ||
33 | + lim.rlim_cur = lim.rlim_max; | ||
34 | + if (setrlimit(RLIMIT_CORE, &lim) == 0) { | ||
35 | + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL, | ||
36 | + "core dump file size limit raised to %lu bytes", | ||
37 | + lim.rlim_cur); | ||
38 | + } else { | ||
39 | + ap_log_error(APLOG_MARK, APLOG_NOTICE, errno, NULL, | ||
40 | + "core dump file size is zero, setrlimit failed"); | ||
41 | + } | ||
42 | + } | ||
43 | + } | ||
44 | +#endif | ||
45 | + | ||
46 | return OK; | ||
47 | } | ||
48 | |||
49 | -- | ||
50 | 2.7.4 | ||
51 | |||