authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-04-10 18:33:54-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-04-10 18:35:14-07:00
log7221e9560ef03e8298f8fe8f9b1610459fceb5c7
treed3350b091e17a3f84a5ea6b933df6c5e7c3c4542
parent60eabc0eca5f678d0c6569a9565b1d6141459518

std.Build.RunStep: don't close stdin

Instead, ignore stdin. Otherwise this interfers with a sub-process which expects to have a stdin file descriptor open.

1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/Build/RunStep.zig+2-2
......@@ -866,9 +866,9 @@ fn spawnChildAndCollect(
866866 child.request_resource_usage_statistics = true;
867867
868868 child.stdin_behavior = switch (self.stdio) {
869 .infer_from_args => if (has_side_effects) .Inherit else .Close,
869 .infer_from_args => if (has_side_effects) .Inherit else .Ignore,
870870 .inherit => .Inherit,
871 .check => .Close,
871 .check => .Ignore,
872872 .zig_test => .Pipe,
873873 };
874874 child.stdout_behavior = switch (self.stdio) {