File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -698,6 +698,38 @@ impl IntoHandle for std::process::ChildStderr {
698698 }
699699}
700700
701+ #[ cfg( unix) ]
702+ impl FromFd for std:: process:: Stdio {
703+ #[ inline]
704+ fn from_fd ( owned : OwnedFd ) -> Self {
705+ unsafe { Self :: from_raw_fd ( owned. into_raw_fd ( ) ) }
706+ }
707+ }
708+
709+ #[ cfg( windows) ]
710+ impl FromHandle for std:: process:: Stdio {
711+ #[ inline]
712+ fn from_handle ( owned : OwnedHandle ) -> Self {
713+ unsafe { Self :: from_raw_handle ( owned. into_raw_handle ( ) ) }
714+ }
715+ }
716+
717+ #[ cfg( windows) ]
718+ impl AsHandle for std:: process:: Child {
719+ #[ inline]
720+ fn as_handle ( & self ) -> BorrowedHandle < ' _ > {
721+ unsafe { BorrowedHandle :: borrow_raw_handle ( self . as_raw_handle ( ) ) }
722+ }
723+ }
724+
725+ #[ cfg( windows) ]
726+ impl IntoHandle for std:: process:: Child {
727+ #[ inline]
728+ fn into_handle ( self ) -> OwnedHandle {
729+ unsafe { OwnedHandle :: from_raw_handle ( self . into_raw_handle ( ) ) }
730+ }
731+ }
732+
701733#[ cfg( unix) ]
702734impl AsFd for std:: os:: unix:: net:: UnixStream {
703735 #[ inline]
You can’t perform that action at this time.
0 commit comments