From 7221e9560ef03e8298f8fe8f9b1610459fceb5c7 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 10 Apr 2023 18:33:54 -0700 Subject: [PATCH] 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. --- lib/std/Build/RunStep.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/Build/RunStep.zig b/lib/std/Build/RunStep.zig index 36b409d907..5658c5936f 100644 --- a/lib/std/Build/RunStep.zig +++ b/lib/std/Build/RunStep.zig @@ -866,9 +866,9 @@ fn spawnChildAndCollect( child.request_resource_usage_statistics = true; child.stdin_behavior = switch (self.stdio) { - .infer_from_args => if (has_side_effects) .Inherit else .Close, + .infer_from_args => if (has_side_effects) .Inherit else .Ignore, .inherit => .Inherit, - .check => .Close, + .check => .Ignore, .zig_test => .Pipe, }; child.stdout_behavior = switch (self.stdio) {