1
0
mirror of https://github.com/golang/go synced 2024-11-19 05:54:44 -07:00

run.bash: set appropriate ulimits

mainly for NetBSD/OpenBSD.

R=bradfitz, r, rsc
CC=golang-dev
https://golang.org/cl/6453154
This commit is contained in:
Shenghou Ma 2012-09-17 01:11:28 +08:00
parent ecb2a0a9e5
commit 329b27a566

View File

@ -14,6 +14,12 @@ unset GOPATH # we disallow local import for non-local packages, if $GOROOT ha
# no core files, please
ulimit -c 0
# Raise soft limits to hard limits for NetBSD/OpenBSD.
# We need at least 256 files and ~300 MB of bss.
# On OS X ulimit -S -n rejects 'unlimited'.
[ "$(ulimit -H -n)" == "unlimited" ] || ulimit -S -n $(ulimit -H -n)
[ "$(ulimit -H -d)" == "unlimited" ] || ulimit -S -n $(ulimit -H -d)
# allow all.bash to avoid double-build of everything
rebuild=true
if [ "$1" = "--no-rebuild" ]; then