Ignore unsupported ulimit -x errors
On Mac OS X (aka Darwin) and some versions of Linux, /bin/sh does
not support ulimit -x. Ignore any errors trying to adjust that
particular resource usage limit.
Change-Id: Ib419c53e23ec904e1215b0541ba0f5bb9e029791
Signed-off-by: Shawn O. Pearce <sop@google.com>
diff --git a/gerrit-war/src/main/webapp/WEB-INF/extra/bin/gerrit.sh b/gerrit-war/src/main/webapp/WEB-INF/extra/bin/gerrit.sh
index 8320a5f..d8a7201 100755
--- a/gerrit-war/src/main/webapp/WEB-INF/extra/bin/gerrit.sh
+++ b/gerrit-war/src/main/webapp/WEB-INF/extra/bin/gerrit.sh
@@ -292,7 +292,8 @@
ulimit -n $GERRIT_FDS ; # open files
ulimit -t unlimited ; # cpu time
ulimit -t unlimited ; # virtual memory
-ulimit -x unlimited ; # file locks
+
+ulimit -x unlimited 2>/dev/null ; # file locks
#####################################################
# This is how the Gerrit server will be started