Skip to content

Commit e3fed3c

Browse files
mlaroucheandrewrk
authored andcommitted
Temp Fix for deadlock in C compilation, found and tested on Windows
1 parent 0a619c6 commit e3fed3c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Compilation.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,16 +1640,16 @@ fn updateCObject(comp: *Compilation, c_object: *CObject, c_comp_progress_node: *
16401640
}
16411641
} else {
16421642
child.stdin_behavior = .Ignore;
1643-
child.stdout_behavior = .Pipe;
1643+
child.stdout_behavior = .Ignore;
16441644
child.stderr_behavior = .Pipe;
16451645

16461646
try child.spawn();
16471647

1648-
const stdout_reader = child.stdout.?.reader();
16491648
const stderr_reader = child.stderr.?.reader();
16501649

16511650
// TODO https://github.com/ziglang/zig/issues/6343
1652-
const stdout = try stdout_reader.readAllAlloc(arena, std.math.maxInt(u32));
1651+
// Please uncomment and use stdout once this issue is fixed
1652+
// const stdout = try stdout_reader.readAllAlloc(arena, std.math.maxInt(u32));
16531653
const stderr = try stderr_reader.readAllAlloc(arena, 10 * 1024 * 1024);
16541654

16551655
const term = child.wait() catch |err| {

0 commit comments

Comments
 (0)