-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
syscall: should not clear nofile rlimit cache when setting other process's nofile rlimit #67184
Comments
Fixes: golang#67184 The syscall unix.Prlimit can set other process's nofile limit, if we do that, we should not clear the calling process's nofile rlimit cache. Signed-off-by: lifubang <lifubang@acmcoder.com>
Fixes: golang#67184 Signed-off-by: lifubang <lifubang@acmcoder.com>
This sounds like a dup of #66797. Closing as a dup. Feel free to reopen if I'm mistaken. Thanks. |
Actually, this one is different. #66797 is about some other process changing the rlimit of a Go process. This issue is about a Go process changing the rlimit of some other process. In the latter case we are accidentally thinking that the Go process is changing its own rlimit. |
Change https://go.dev/cl/583299 mentions this issue: |
Go version
go version go1.19
Output of
go env
in your module/workspace:What did you do?
When we use
unix.Prlimit
to set other process's nofile limit, we should not clear the calling process's nofile limit cache, it will cause the nofile limit setting invalid when we useunix.Exec
.The reprodecing code:
What did you see happen?
What did you expect to see?
The last output of
./prlimit true
should be the same as./prlimit false
.The text was updated successfully, but these errors were encountered: