aboutsummaryrefslogtreecommitdiffstats
path: root/main/app.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-02 18:37:25 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-02 18:37:25 +0000
commitd263efd302410c05e5f511eeb8d8d00e63bc22ea (patch)
tree2a72f8ea75ee9e1bea8ed0b8ed34af58fe4176f6 /main/app.c
parent5575faefc39347f831459c4430af750400a73199 (diff)
Close up to the soft open file limit (same on Linux, but varies drastically on OS X).
Also, a Makefile fix for Darwin (OS X). (closes issue #14542) Reported by: jtodd Patches: 20090901__issue14542.diff.txt uploaded by tilghman (license 14) Tested by: jtodd, tilghman Change-type: bugfix git-svn-id: http://svn.digium.com/svn/asterisk/trunk@215567 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/app.c')
-rw-r--r--main/app.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/app.c b/main/app.c
index f86885885..99dcfa677 100644
--- a/main/app.c
+++ b/main/app.c
@@ -2015,7 +2015,7 @@ void ast_close_fds_above_n(int n)
struct rlimit rl;
getrlimit(RLIMIT_NOFILE, &rl);
null = open("/dev/null", O_RDONLY);
- for (x = n + 1; x < rl.rlim_max; x++) {
+ for (x = n + 1; x < rl.rlim_cur; x++) {
if (x != null) {
/* Side effect of dup2 is that it closes any existing fd without error.
* This prevents valgrind and other debugging tools from sending up