From: Benny Siegert Date: Mon, 17 Jun 2013 09:31:58 +0000 (+1000) Subject: run.bash: raise ulimit for the number of threads. X-Git-Tag: go1.2rc2~1238 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8a4efed63c02f18c14b3e445f399d421d23dfa32;p=gostls13.git run.bash: raise ulimit for the number of threads. This is needed on NetBSD-current. Support for ulimit -T in bash was added in 4.2nb3. R=golang-dev, minux.ma, rsc, dave CC=golang-dev https://golang.org/cl/10078047 --- diff --git a/src/run.bash b/src/run.bash index 685bc8279c..b29846a262 100755 --- a/src/run.bash +++ b/src/run.bash @@ -20,6 +20,11 @@ ulimit -c 0 [ "$(ulimit -H -n)" == "unlimited" ] || ulimit -S -n $(ulimit -H -n) [ "$(ulimit -H -d)" == "unlimited" ] || ulimit -S -d $(ulimit -H -d) +# Thread count limit on NetBSD 7. +if ulimit -T &> /dev/null; then + [ "$(ulimit -H -T)" == "unlimited" ] || ulimit -S -T $(ulimit -H -T) +fi + # allow all.bash to avoid double-build of everything rebuild=true if [ "$1" = "--no-rebuild" ]; then