- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
No way to extract an owned RawFd
from ChildStdout
#5333
Comments
Generally, the reason that we don't implement I would have to think about it when it comes to an |
@Darksonn pretty much the fallible unwrap IIRC |
The As I said, I can live without this conversion for now, but the topic of |
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]>
Is your feature request related to a problem? Please describe.
I am trying to implement support for named Unix pipes (#5318) and I am considering adding conversion from types in
tokio::process
which hold a file descriptor to a pipe end. However, I've noticed that currently there is no way to turnChildStdout
,ChildStderr
andChildStdin
types into an ownedRawFd
, even though they implementAsRawFd
.In this particular case, I can probably hack my way through internally to get the fd, but I think it would be useful to expose such conversion to the public API.
Describe the solution you'd like
Add a new method to the
ChildStdout
, analogous to the from_std method:which would perform conversion from an asynchronous
ChildStdout
to a synchronous one, which in turn implementsIntoRawFd
. Also add similar methods toChildStderr
andChildStdin
types.Describe alternatives you've considered
Implement
IntoRawFd
to those types directly, but from what I can see tokio does not implement this trait for most types in favor ofinto_std
-like methods.The text was updated successfully, but these errors were encountered: