summaryrefslogtreecommitdiff
path: root/src/run.bash
diff options
context:
space:
mode:
authorBenny Siegert <bsiegert@gmail.com>2013-06-17 19:31:58 +1000
committerBenny Siegert <bsiegert@gmail.com>2013-06-17 19:31:58 +1000
commitb9891d65492d9e5360e38d164abf7b4625deed21 (patch)
tree41a428271ad1ff26092fe9c242b8a085f22bf097 /src/run.bash
parentcd208cfe881f9b84109e9bd9ba65c815591680c1 (diff)
downloadgo-b9891d65492d9e5360e38d164abf7b4625deed21.tar.gz
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://codereview.appspot.com/10078047 Committer: Dave Cheney <dave@cheney.net>
Diffstat (limited to 'src/run.bash')
-rwxr-xr-xsrc/run.bash5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/run.bash b/src/run.bash
index 685bc8279..b29846a26 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