Commit 7221e9560e

Andrew Kelley <andrew@ziglang.org>
2023-04-11 03:33:54
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 parent 60eabc0
Changed files (1)
lib
std
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) {