]> Cypherpunks repositories - gostls13.git/commitdiff
run.bash: raise ulimit for the number of threads.
authorBenny Siegert <bsiegert@gmail.com>
Mon, 17 Jun 2013 09:31:58 +0000 (19:31 +1000)
committerDave Cheney <dave@cheney.net>
Mon, 17 Jun 2013 09:31:58 +0000 (19:31 +1000)
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

src/run.bash

index 685bc8279c709202fa678e32fe1eddfc28710c6a..b29846a2620788fc1276131e094301dabe11c7aa 100755 (executable)
@@ -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