summaryrefslogtreecommitdiff
path: root/src/run.bash
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-02-24 16:44:35 -0500
committerRuss Cox <rsc@golang.org>2014-02-24 16:44:35 -0500
commit275cdfebe23f55b6fd90df55442deb9af868de55 (patch)
tree70c93f9334211131de5dfce67771bb3217cbe994 /src/run.bash
parent8735a870b2c7c60f8b6af47a17d6d9eefc19687c (diff)
downloadgo-275cdfebe23f55b6fd90df55442deb9af868de55.tar.gz
build: comment possible ulimit failure in run.bash
Record what's going on in case someone is debugging a failure there. It's not Go's fault. Fixes issue 7381. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/68200043
Diffstat (limited to 'src/run.bash')
-rwxr-xr-xsrc/run.bash6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/run.bash b/src/run.bash
index 9a01e0631..a3eecff0f 100755
--- a/src/run.bash
+++ b/src/run.bash
@@ -17,6 +17,12 @@ 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'.
+#
+# Note that ulimit -S -n may fail if ulimit -H -n is set higher than a
+# non-root process is allowed to set the high limit.
+# This is a system misconfiguration and should be fixed on the
+# broken system, not "fixed" by ignoring the failure here.
+# See longer discussion on golang.org/issue/7381.
[ "$(ulimit -H -n)" == "unlimited" ] || ulimit -S -n $(ulimit -H -n)
[ "$(ulimit -H -d)" == "unlimited" ] || ulimit -S -d $(ulimit -H -d)