[105748] trunk/base/src/pextlib1.0/tracelib.c

cal at macports.org cal at macports.org
Sat May 4 04:35:31 PDT 2013


Revision: 105748
          https://trac.macports.org/changeset/105748
Author:   cal at macports.org
Date:     2013-05-04 04:35:30 -0700 (Sat, 04 May 2013)
Log Message:
-----------
pextlib1.0/tracelib.c: Fix rlimit parameters, closes #38999

Modified Paths:
--------------
    trunk/base/src/pextlib1.0/tracelib.c

Modified: trunk/base/src/pextlib1.0/tracelib.c
===================================================================
--- trunk/base/src/pextlib1.0/tracelib.c	2013-05-04 11:20:12 UTC (rev 105747)
+++ trunk/base/src/pextlib1.0/tracelib.c	2013-05-04 11:35:30 UTC (rev 105748)
@@ -430,11 +430,13 @@
 	
 	interp=in;
 	
-	rl.rlim_cur=rl.rlim_max=RLIM_INFINITY;
+	/* raise the limit of open files to the maximum from the default soft limit
+	 * of 256 */
 #if defined(__APPLE__) && defined(OPEN_MAX)
-	if (OPEN_MAX < rl.rlim_cur)
-		rl.rlim_cur = OPEN_MAX;
+	if (rl.rlim_max > OPEN_MAX)
+		rl.rlim_max = OPEN_MAX;
 #endif
+	rl.rlim_cur = rl.rlim_max;
 	if(setrlimit(RLIMIT_NOFILE, &rl)==-1)
 	{
 		ui_warn("setrlimit failed (%d)", errno);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130504/1c06e93c/attachment.html>


More information about the macports-changes mailing list