diff options
author | Benny Siegert <bsiegert@gmail.com> | 2013-06-17 19:31:58 +1000 |
---|---|---|
committer | Benny Siegert <bsiegert@gmail.com> | 2013-06-17 19:31:58 +1000 |
commit | b9891d65492d9e5360e38d164abf7b4625deed21 (patch) | |
tree | 41a428271ad1ff26092fe9c242b8a085f22bf097 /src/run.bash | |
parent | cd208cfe881f9b84109e9bd9ba65c815591680c1 (diff) | |
download | go-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-x | src/run.bash | 5 |
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 |