-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feature(process): Use pidfd on Linux for tokio::process::Child::wait
#6152
Commits on Dec 31, 2023
-
feat(process) pidfd: Implement initial
PidfdReaper
implSigned-off-by: Jiahao XU <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d3b6551 - Browse repository at this point
Copy the full SHA d3b6551View commit details -
Use
PidfdReaper
inunix::Child
if possiblefallback to signal-based `Reaper` if pidfd cannot be created. Signed-off-by: Jiahao XU <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 106d9c8 - Browse repository at this point
Copy the full SHA 106d9c8View commit details -
Fix compilation on non-linux targets
Signed-off-by: Jiahao XU <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a3945d0 - Browse repository at this point
Copy the full SHA a3945d0View commit details -
Signed-off-by: Jiahao XU <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c6a869f - Browse repository at this point
Copy the full SHA c6a869fView commit details -
Fix running tests in
pidfd_reaper
Signed-off-by: Jiahao XU <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5f62be6 - Browse repository at this point
Copy the full SHA 5f62be6View commit details -
Disable
pidfd_reaper
test for miriSince miri does not support process spawning Signed-off-by: Jiahao XU <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 92bef5a - Browse repository at this point
Copy the full SHA 92bef5aView commit details -
Skip pidfd testing on unsupported linux kernel
Only Linux kernel >= 5.10 support pidfd Signed-off-by: Jiahao XU <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 80a1cd7 - Browse repository at this point
Copy the full SHA 80a1cd7View commit details -
Optimization: Skip
pidfd_open
if last call failed withENOSYS
And fixed `test::is_pidfd_available` Signed-off-by: Jiahao XU <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c38faca - Browse repository at this point
Copy the full SHA c38facaView commit details -
Fix
PidfdReaper::drop
: do not spawn any task thereTo avoid potential headaches such as: - The drop being run outside of a Tokio runtime context - The runtime being present but not actually running Since this is the initial implementation, I chose to use the `OrphanQueue` also used by the signal-driven `Reaper` impl. It's simple and easy to implement without having to add runtime driver and guaranteed to work. Further improvement can be done on the basis of this PR. Signed-off-by: Jiahao XU <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3b89981 - Browse repository at this point
Copy the full SHA 3b89981View commit details
Commits on Jan 9, 2024
-
Only pull in
PidfdReaper
if feature rt is enabled on LinuxInstead of automatically enabling feature `rt` if `process` is enabled, even if the target os is not `linux`. Signed-off-by: Jiahao XU <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bf14726 - Browse repository at this point
Copy the full SHA bf14726View commit details -
Add test
process_spawned_outside_runtime
Signed-off-by: Jiahao XU <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 523117a - Browse repository at this point
Copy the full SHA 523117aView commit details -
Add
process_spawned_and_wait_in_different_runtime
Signed-off-by: Jiahao XU <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 66a2f4e - Browse repository at this point
Copy the full SHA 66a2f4eView commit details
Commits on Jan 10, 2024
-
Fix process_spawned_and_wait_in_different_runtime on linux with pidfd
Signed-off-by: Jiahao XU <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ef05617 - Browse repository at this point
Copy the full SHA ef05617View commit details -
Improve safety comments in
Pidfd::open
Also remove invocation of one `unsafe` function `errno_location`. Signed-off-by: Jiahao XU <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e89a5ec - Browse repository at this point
Copy the full SHA e89a5ecView commit details -
Refactor
<PidfdReaperInner as Future>::poll
Move `err.kind() == io::ErrorKind::Other` checking into `is_rt_shutdown_err` Signed-off-by: Jiahao XU <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f093c44 - Browse repository at this point
Copy the full SHA f093c44View commit details -
Refactor: Mv
process_spawned_*
intoprocess_change_of_runtime.rs
Signed-off-by: Jiahao XU <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7ee4509 - Browse repository at this point
Copy the full SHA 7ee4509View commit details
Commits on Jan 11, 2024
-
Fix leaked
sleep
process intest_pidfd_reaper_drop
Signed-off-by: Jiahao XU <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for dc889e3 - Browse repository at this point
Copy the full SHA dc889e3View commit details