mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +00:00
process: Implement AsRawFd for ChildStd* structs
This commit is contained in:
parent
3b43262a10
commit
e0e9594f71
24
src/lib.rs
24
src/lib.rs
@ -619,3 +619,27 @@ impl Read for ChildStderr {
|
|||||||
|
|
||||||
impl AsyncRead for ChildStderr {
|
impl AsyncRead for ChildStderr {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(unix)]
|
||||||
|
mod sys {
|
||||||
|
use std::os::unix::io::{AsRawFd, RawFd};
|
||||||
|
use super::{ChildStdin, ChildStdout, ChildStderr};
|
||||||
|
|
||||||
|
impl AsRawFd for ChildStdin {
|
||||||
|
fn as_raw_fd(&self) -> RawFd {
|
||||||
|
self.inner.get_ref().as_raw_fd()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl AsRawFd for ChildStdout {
|
||||||
|
fn as_raw_fd(&self) -> RawFd {
|
||||||
|
self.inner.get_ref().as_raw_fd()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl AsRawFd for ChildStderr {
|
||||||
|
fn as_raw_fd(&self) -> RawFd {
|
||||||
|
self.inner.get_ref().as_raw_fd()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user