Files
runc/libcontainer/system/rlimit_linux.go
T
Kir Kolyshkin 237cc9806a libct/sys/rlimit_linux: drop go:build tag
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>
2025-08-27 19:09:58 -07:00

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)
}