]> Cypherpunks repositories - gostls13.git/commit
syscall: use RLIMIT_CPU instead of RLIMIT_NOFILE
authorTamir Duberstein <tamird@google.com>
Thu, 27 Jan 2022 15:29:04 +0000 (15:29 +0000)
committerIan Lance Taylor <iant@golang.org>
Wed, 9 Feb 2022 22:06:20 +0000 (22:06 +0000)
commitea3c546e9e2b507d497f8093f8414cb31c112062
tree2d0653eedb6d9f014941e6c774a71f0ea931baf8
parent2e2ef31778800856d9db87ad06cc963ef2530eeb
syscall: use RLIMIT_CPU instead of RLIMIT_NOFILE

The latter is subject to kern.maxfilelimit restrictions on darwin which
are not reflected in the return value. This makes it difficult to
reliably restore the default after the test is complete. RLIMIT_CPU
should hopefully sidestep this problem.

Updates #40564.

Change-Id: Ifb33c7d46f2708130cef366dc245c643a2d5e465
Reviewed-on: https://go-review.googlesource.com/c/go/+/383234
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Trust: Bryan Mills <bcmills@google.com>
src/syscall/syscall_unix_test.go