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
os: use pidfd_open with epoll on Linux instead of blocking wait in blockUntilWaitable #60320
Comments
I don't see any API change here, so this doesn't have to be a proposal. Taking it out of the proposal process. |
Using pidfd allows us to have a handle on the process and poll the handle to non-blocking wait for the process to exit. Fixes golang#34396 Fixes golang#60321 Fixes golang#60320
OK, I made a draft of the implementation in #60461 to test how would this work out. It is not yet perfect (see comments on Gerrit), but it gives me/us something to play around. I think it works pretty nice. |
Using pidfd allows us to have a handle on the process and poll the handle to non-blocking wait for the process to exit. Fixes golang#34396 Fixes golang#60321 Fixes golang#60320
Change https://go.dev/cl/498615 mentions this issue: |
Using pidfd allows us to have a handle on the process and poll the handle to non-blocking wait for the process to exit. Fixes golang#34396 Fixes golang#60321 Fixes golang#60320
My understanding is that in
blockUntilWaitable
thewaitid
call blocks the thread you call it on. On Linux, we could instead usepidfd_open
and then monitor the file descriptor with epool:I think this would then not block the thread?
The text was updated successfully, but these errors were encountered: