From 00db1b0647d2cf130c4be43f80fd09eddd8dd0b8 Mon Sep 17 00:00:00 2001 From: Gray Liang Date: Mon, 28 Aug 2023 20:53:14 +0800 Subject: [PATCH] Set RLIM_INFINITY to rlimit nofile Former limit 4096 isn't enough for `--all-kmods`, lsof shows pwru uses as many as 5269 fds in that case. Siged-off-by: Zhichuan Liang --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index b9deb8a1..409d363f 100644 --- a/main.go +++ b/main.go @@ -36,8 +36,8 @@ func main() { } if err := unix.Setrlimit(unix.RLIMIT_NOFILE, &unix.Rlimit{ - Cur: 4096, - Max: 4096, + Cur: unix.RLIM_INFINITY, + Max: unix.RLIM_INFINITY, }); err != nil { log.Fatalf("failed to set temporary rlimit: %s", err) }