You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was going to try to implement I/O safety types on the handles as per sunfishcode/io-lifetimes#38, but then I realized that ChildStdin, ChildStdout and ChildStderr don't implement AsRawFd at all.
I believe that this is due to the fact that Unblock is used to wrap the inner std type, which makes it difficult to access the methods of the inner type. I see three possible ways to resolve this:
On Windows, wrap ChildStd* in an Arc that is stored in the structure as well as the Unblock, so that methods on the inner type can be accessed more easily.
Make it easier to access the inner file descriptor for Unblock types. We could potentially implement AsRawHandle on Unblock<T: AsRawHandle> that panics if the inner type is not accessible, or maybe some kind of get_ref(&self) -> Option<&T> general purpose method.
Implement AsRawFd on unix, since it is easy to get the inner type via async_io::Async, but don't implement the corresponding types on Windows.
The text was updated successfully, but these errors were encountered:
I was going to try to implement I/O safety types on the handles as per sunfishcode/io-lifetimes#38, but then I realized that
ChildStdin
,ChildStdout
andChildStderr
don't implementAsRawFd
at all.I believe that this is due to the fact that
Unblock
is used to wrap the innerstd
type, which makes it difficult to access the methods of the inner type. I see three possible ways to resolve this:ChildStd*
in anArc
that is stored in the structure as well as theUnblock
, so that methods on the inner type can be accessed more easily.Unblock
types. We could potentially implementAsRawHandle
onUnblock<T: AsRawHandle>
that panics if the inner type is not accessible, or maybe some kind ofget_ref(&self) -> Option<&T>
general purpose method.AsRawFd
onunix
, since it is easy to get the inner type viaasync_io::Async
, but don't implement the corresponding types on Windows.The text was updated successfully, but these errors were encountered: