aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenny Siegert <bsiegert@gmail.com>2013-06-17 19:31:58 +1000
committerDave Cheney <dave@cheney.net>2013-06-17 19:31:58 +1000
commit8a4efed63c02f18c14b3e445f399d421d23dfa32 (patch)
treec78427a3e227fb707743415673ad5fa914b6a0be /src
parent94dc963b558b3d37906af53eca45c5ae807a9e84 (diff)
downloadgo-8a4efed63c02f18c14b3e445f399d421d23dfa32.tar.xz
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
Diffstat (limited to 'src')
-rwxr-xr-xsrc/run.bash5
1 files changed, 5 insertions, 0 deletions
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