[asterisk-commits] tilghman: trunk r215567 - in /trunk/main: Makefile app.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 2 13:37:30 CDT 2009


Author: tilghman
Date: Wed Sep  2 13:37:25 2009
New Revision: 215567

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=215567
Log:
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

Modified:
    trunk/main/Makefile
    trunk/main/app.c

Modified: trunk/main/Makefile
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/Makefile?view=diff&rev=215567&r1=215566&r2=215567
==============================================================================
--- trunk/main/Makefile (original)
+++ trunk/main/Makefile Wed Sep  2 13:37:25 2009
@@ -44,7 +44,7 @@
 
 ifneq ($(findstring darwin,$(OSARCH)),)
   AST_LIBS+=-lresolv
-  ASTLINK=-undefined suppress -force_flat_namespace
+  ASTLINK=-Xlinker -macosx_version_min -Xlinker 10.4 -Xlinker -undefined -Xlinker dynamic_lookup -force_flat_namespace
 else
 # These are used for all but Darwin
   ifneq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)

Modified: trunk/main/app.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/app.c?view=diff&rev=215567&r1=215566&r2=215567
==============================================================================
--- trunk/main/app.c (original)
+++ trunk/main/app.c Wed Sep  2 13:37:25 2009
@@ -2015,7 +2015,7 @@
 	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




More information about the asterisk-commits mailing list