activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1373789 - /activemq/activemq-apollo/trunk/apollo-distro/src/main/release/bin/apollo
Date Thu, 16 Aug 2012 11:13:35 GMT
Author: chirino
Date: Thu Aug 16 11:13:35 2012
New Revision: 1373789

URL: http://svn.apache.org/viewvc?rev=1373789&view=rev
Log:
Fixes APLO-243 : Do not lower the maximum number of open files

Applied patch contributed by Lionel Cons.  Thanks!

Modified:
    activemq/activemq-apollo/trunk/apollo-distro/src/main/release/bin/apollo

Modified: activemq/activemq-apollo/trunk/apollo-distro/src/main/release/bin/apollo
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-distro/src/main/release/bin/apollo?rev=1373789&r1=1373788&r2=1373789&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-distro/src/main/release/bin/apollo (original)
+++ activemq/activemq-apollo/trunk/apollo-distro/src/main/release/bin/apollo Thu Aug 16 11:13:35
2012
@@ -153,6 +153,12 @@ if [ ! -z "$APOLLO_BASE" ] ; then
 fi
 
 # Attempt to bump up the ulimit 
-ulimit -n 100000 > /dev/null 2> /dev/null
+target=100000
+limit=`ulimit -n 2>/dev/null`
+case $limit in
+    unlimited) ;;
+    [0-9]*) [ $limit -lt 10000 ] && ulimit -n $target >/dev/null 2>/dev/null
;;
+    *) ulimit -n $target >/dev/null 2>/dev/null ;;
+esac
 
 ${EXEC} "$JAVACMD" ${JVM_FLAGS} ${SYSTEM_PROPS} -classpath "${CLASSPATH}" org.apache.activemq.apollo.boot.Apollo
${BOOTDIRS} org.apache.activemq.apollo.cli.Apollo $@



Mime
View raw message