diff options
author | Manlio Perillo <manlio.perillo@gmail.com> | 2023-04-29 16:25:58 +0200 |
---|---|---|
committer | Manlio Perillo <manlio.perillo@gmail.com> | 2023-04-29 16:25:58 +0200 |
commit | 4b1e292ae448ab519d0681b49da7420130b5f312 (patch) | |
tree | 7a862303f2b2f00babe99cd406b4ea51bdeb9f69 | |
parent | 93e8b5710c12170271d63bc4a9eb49f3605f02d0 (diff) |
test: fix deadlock on windows when running tests
The deadlock was caused by setting stdout behavior to ignore, when
spawning the patch command. When the patch command writes to devnull it
causes some errors and a deadlock.
The cause of the bug is probably Zig using `\Device\Null` from `ntdll`
while git-bash uses `NUL` from `kernel32`.
-rw-r--r-- | test/tests.zig | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/test/tests.zig b/test/tests.zig index f91c4fd..f166fc2 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -336,7 +336,6 @@ fn heal(allocator: Allocator, exercises: []const Exercise, outdir: []const u8) ! const argv = &.{ "patch", "-i", patch, "-o", output, file }; var child = std.process.Child.init(argv, allocator); - child.stdout_behavior = .Ignore; // the POSIX standard says that stdout is not used _ = try child.spawnAndWait(); } } |