mirror of
https://codeberg.org/andyscott/ziglings.git
synced 2024-12-22 06:03:09 -05:00
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`.
This commit is contained in:
parent
93e8b5710c
commit
4b1e292ae4
1 changed files with 0 additions and 1 deletions
|
@ -336,7 +336,6 @@ fn heal(allocator: Allocator, exercises: []const Exercise, outdir: []const u8) !
|
||||||
const argv = &.{ "patch", "-i", patch, "-o", output, file };
|
const argv = &.{ "patch", "-i", patch, "-o", output, file };
|
||||||
|
|
||||||
var child = std.process.Child.init(argv, allocator);
|
var child = std.process.Child.init(argv, allocator);
|
||||||
child.stdout_behavior = .Ignore; // the POSIX standard says that stdout is not used
|
|
||||||
_ = try child.spawnAndWait();
|
_ = try child.spawnAndWait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue