aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/debug/stack_test.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2022-03-14 11:27:46 -0400
committerRuss Cox <rsc@golang.org>2022-03-15 15:21:54 +0000
commitb054c7dc1738c810e74756ae0ac4797ce5d31cf6 (patch)
tree97fb483d202cdf694c9449311a2b4e4bbffa4a18 /src/runtime/debug/stack_test.go
parent7b15e297a26842f1f3408ee9d7942f8cfab2e5ea (diff)
downloadgo-b054c7dc1738c810e74756ae0ac4797ce5d31cf6.tar.xz
os: raise open file rlimit at startup
Some systems set an artificially low soft limit on open file count, for compatibility with code that uses select and its hard-coded maximum file descriptor (limited by the size of fd_set). Go does not use select, so it should not be subject to these limits. On some systems the limit is 256, which is very easy to run into, even in simple programs like gofmt when they parallelize walking a file tree. After a long discussion on go.dev/issue/46279, we decided the best approach was for Go to raise the limit unconditionally for itself, and then leave old software to set the limit back as needed. Code that really wants Go to leave the limit alone can set the hard limit, which Go of course has no choice but to respect. Fixes #46279. Change-Id: Id6107503437d47a870a41be25e822fc79cea08b2 Reviewed-on: https://go-review.googlesource.com/c/go/+/392415 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/debug/stack_test.go')
0 files changed, 0 insertions, 0 deletions