mirror of
https://github.com/opencontainers/runc.git
synced 2026-04-22 23:17:17 +08:00
237cc9806a
This is not needed since commit 16d73367 which sets 1.23 to be a
minimally required Go version.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
14 lines
416 B
Go
14 lines
416 B
Go
package system
|
|
|
|
import (
|
|
"syscall"
|
|
)
|
|
|
|
// ClearRlimitNofileCache clears go runtime's nofile rlimit cache. The argument
|
|
// is process RLIMIT_NOFILE values. Relies on go.dev/cl/588076.
|
|
func ClearRlimitNofileCache(lim *syscall.Rlimit) {
|
|
// Ignore the return values since we only need to clean the cache,
|
|
// the limit is going to be set via unix.Prlimit elsewhere.
|
|
_ = syscall.Setrlimit(syscall.RLIMIT_NOFILE, lim)
|
|
}
|