[jboss-cvs] JBossAS SVN: r86273 - branches/Branch_5_x/main/src/bin.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Mar 24 16:39:07 EDT 2009


Author: jason.greene at jboss.com
Date: 2009-03-24 16:39:07 -0400 (Tue, 24 Mar 2009)
New Revision: 86273

Modified:
   branches/Branch_5_x/main/src/bin/run.sh
Log:
Fix JBAS-5965 - Max file soft limit can not always be set to hard limit on Darwin (OS X)


Modified: branches/Branch_5_x/main/src/bin/run.sh
===================================================================
--- branches/Branch_5_x/main/src/bin/run.sh	2009-03-24 20:32:29 UTC (rev 86272)
+++ branches/Branch_5_x/main/src/bin/run.sh	2009-03-24 20:39:07 UTC (rev 86273)
@@ -81,6 +81,11 @@
 if [ "$cygwin" = "false" ]; then
     MAX_FD_LIMIT=`ulimit -H -n`
     if [ "$?" -eq 0 ]; then
+        # Darwin does not allow RLIMIT_INFINITY on file soft limit
+        if [ "$darwin" = "true" -a "$MAX_FD_LIMIT" = "unlimited" ]; then
+            MAX_FD_LIMIT=`/usr/sbin/sysctl -n kern.maxfilesperproc`
+        fi
+
 	if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
 	    # use the system max
 	    MAX_FD="$MAX_FD_LIMIT"




More information about the jboss-cvs-commits mailing list