-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Why doesn't tokio::process::ChildStdin implements IntoRawFd #4403
Comments
Well, the conversion is fallible, which the trait doesn't support. |
Is it because the conversion into |
Yes, but also because its registration with epoll needs to be removed. |
OK, I got it. Is it possible to have some alternative API that can return the fd along with its ownership? I personally is OK with the fd being |
Sure, we could have an |
I don’t think we can support “into_std” since “ChildStdin” doesn’t support FromRawFd. |
Ok, I guess that's why we don't have it already. I'm sure we could find some other alternative. |
Maybe something like |
We would probably use the same return type as the |
I agree that introduce a new dependency is too much and using “RawFd” is fair enough. I think having a new unix-only trait for this is the way to go, since “ChildStdin”, “ChildStdout” and “ChildStderr” will all have this method implemented. |
Fixed tokio-rs#4403 and fixed tokio-rs#5333 Signed-off-by: Jiahao XU <[email protected]>
Fixed tokio-rs#4403 and fixed tokio-rs#5333 Signed-off-by: Jiahao XU <[email protected]>
Fixed tokio-rs#4403 and fixed tokio-rs#5333 Signed-off-by: Jiahao XU <[email protected]>
Fixed tokio-rs#4403 and fixed tokio-rs#5333 Signed-off-by: Jiahao XU <[email protected]>
Fixed tokio-rs#4403 and fixed tokio-rs#5333 Signed-off-by: Jiahao XU <[email protected]>
Fixed tokio-rs#4403 and fixed tokio-rs#5333 Signed-off-by: Jiahao XU <[email protected]>
Fixed tokio-rs#4403 and fixed tokio-rs#5333 Signed-off-by: Jiahao XU <[email protected]>
Fixed tokio-rs#4403 and fixed tokio-rs#5333 Signed-off-by: Jiahao XU <[email protected]>
Since
tokio::process::ChildStdin
already implementsAsRawFd
, it seems to be only natural that it also implementsIntoRawFd
likestd::process::ChildStdin
.What is the reason for it to not implement
IntoRawFd
?The text was updated successfully, but these errors were encountered: