File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,15 @@ impl Command {
81
81
. into_iter ( )
82
82
. zip ( is_inherited)
83
83
. filter_map ( |( stdio, is_inherited) | if !is_inherited { Some ( stdio) } else { None } )
84
+ // Note that once we do this, these file descriptors
85
+ // (and the Fds we got them from above) should no longer be used in
86
+ // any async context, as they'd start blocking.
87
+ //
88
+ // We give away the descriptors in stdios when we pass them to
89
+ // open_new_session (which doesn't use them in an async context),
90
+ // and the Fds are dropped when this function returns, meaning no
91
+ // owned file descriptors we set to be blocking here can be used in
92
+ // an async context in the future.
84
93
. try_for_each ( |stdio| set_blocking ( stdio) . map_err ( Error :: ChildIo ) ) ?;
85
94
86
95
let cmd = NonZeroByteSlice :: new ( & self . cmd ) . ok_or ( Error :: InvalidCommand ) ?;
You can’t perform that action at this time.
0 commit comments