Skip to content
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

Merged
merged 17 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix compilation on non-linux targets
Signed-off-by: Jiahao XU <[email protected]>
  • Loading branch information
NobodyXu committed Dec 31, 2023
commit a3945d08e83f33d5daa5724997c7e2ec33c0a8f2
4 changes: 2 additions & 2 deletions tokio/src/io/poll_evented.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ impl<E: Source> PollEvented<E> {
Ok(inner)
}

#[cfg(feature = "process")]
#[cfg(all(feature = "process", target_os = "linux"))]
pub(crate) fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
self.registration
.poll_read_ready(cx)
.map_err(io::Error::from)
.map_ok(|_| ())
}

#[cfg(feature = "process")]
#[cfg(all(feature = "process", target_os = "linux"))]
pub(crate) fn scheduler_handle(&self) -> &scheduler::Handle {
self.registration.scheduler_handle()
}
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/runtime/io/registration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ impl Registration {
self.handle.driver().io()
}

#[cfg(feature = "process")]
#[cfg(all(feature = "process", target_os = "linux"))]
pub(crate) fn scheduler_handle(&self) -> &scheduler::Handle {
&self.handle
}
Expand Down