File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -824,8 +824,10 @@ fn spawnPosix(self: *ChildProcess) SpawnError!void {
824
824
// we are the parent
825
825
errdefer comptime unreachable ; // The child is forked; we must not error from now on
826
826
827
- posix .close (err_pipe [1 ]); // make sure only the child holds the write end open
828
- self .err_pipe = err_pipe [0 ];
827
+ if (! use_clone ) {
828
+ posix .close (err_pipe [1 ]); // make sure only the child holds the write end open
829
+ self .err_pipe = err_pipe [0 ];
830
+ }
829
831
830
832
const pid : i32 = @intCast (pid_result );
831
833
if (self .stdin_behavior == .Pipe ) {
@@ -845,9 +847,6 @@ fn spawnPosix(self: *ChildProcess) SpawnError!void {
845
847
}
846
848
847
849
self .id = pid ;
848
- if (! use_clone ) {
849
- self .err_pipe = err_pipe ;
850
- }
851
850
self .term = null ;
852
851
853
852
if (self .stdin_behavior == .Pipe ) {
You can’t perform that action at this time.
0 commit comments