From: Shenghou Ma Date: Sun, 16 Sep 2012 17:11:28 +0000 (+0800) Subject: run.bash: set appropriate ulimits X-Git-Tag: go1.1rc2~2444 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=329b27a5666c469212a73626a278feb49b1b0e89;p=gostls13.git run.bash: set appropriate ulimits mainly for NetBSD/OpenBSD. R=bradfitz, r, rsc CC=golang-dev https://golang.org/cl/6453154 --- diff --git a/src/run.bash b/src/run.bash index e818e96ecc..01560fa371 100755 --- a/src/run.bash +++ b/src/run.bash @@ -14,6 +14,12 @@ unset GOPATH # we disallow local import for non-local packages, if $GOROOT ha # no core files, please ulimit -c 0 +# Raise soft limits to hard limits for NetBSD/OpenBSD. +# We need at least 256 files and ~300 MB of bss. +# On OS X ulimit -S -n rejects 'unlimited'. +[ "$(ulimit -H -n)" == "unlimited" ] || ulimit -S -n $(ulimit -H -n) +[ "$(ulimit -H -d)" == "unlimited" ] || ulimit -S -n $(ulimit -H -d) + # allow all.bash to avoid double-build of everything rebuild=true if [ "$1" = "--no-rebuild" ]; then