]> Cypherpunks repositories - gostls13.git/commit
syscall: cap RLIMIT_NOFILE soft limit in TestRlimit on darwin
authorCholerae Hu <choleraehyq@gmail.com>
Wed, 5 Aug 2020 05:52:32 +0000 (13:52 +0800)
committerTobias Klauser <tobias.klauser@gmail.com>
Mon, 17 Aug 2020 09:14:51 +0000 (09:14 +0000)
commitbf512685fee6282f1a50069ef444412bdf59611b
treef4d2c7259de03b18eedb7349ab6f7d207b072a68
parentd79350bac73670c04a91b6761d334b810201f6ee
syscall: cap RLIMIT_NOFILE soft limit in TestRlimit on darwin

On some machines, kern.maxfilesperproc is 4096. If Rlimit.Cur is larger
than that, Setrlimit will get an errEINVAL.

Fixes #40564.

Change-Id: Ib94303c790a489ff0559c88d41a021e514d18f8d
Reviewed-on: https://go-review.googlesource.com/c/go/+/246658
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/syscall/syscall_unix_test.go