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 $@