Use pidfd in runsc process management
- Dominant language
- Go
- Stars
- 19.3k
- Forks
- 2k
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 264
Description
runsc uses gofer and sandbox PIDs to check whether the sandbox is still running and to kill it on destruction. There is a chance the PID belongs to another process and it ends up killing the wrong one. pidfd helps because it can be used to guarantee that the correct process is being killed. In case of vanilla runsc it can open pidfd, check if this the correct process, then send signal. In case we have moved to having a dedicated runsc client (#238), then pidfd can replace pid's everywhere.
We may also be able to use pidfd to check if the parent still exists in `runsc boot --attached` after setting parent death signal to ensure the parent hasn't died before the signal is set.
Contributor guide
Assessment
This issue has not been assessed yet.