mirror of
https://github.com/ziglang/zig.git
synced 2025-12-30 18:13:19 +00:00
zig build: lock stderr while executing the build runner
This commit is contained in:
parent
352dc2c06a
commit
2759173452
@ -5151,7 +5151,12 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !void {
|
||||
child.stdout_behavior = .Inherit;
|
||||
child.stderr_behavior = .Inherit;
|
||||
|
||||
const term = try child.spawnAndWait();
|
||||
const term = t: {
|
||||
std.debug.lockStdErr();
|
||||
defer std.debug.unlockStdErr();
|
||||
break :t try child.spawnAndWait();
|
||||
};
|
||||
|
||||
switch (term) {
|
||||
.Exited => |code| {
|
||||
if (code == 0) return cleanExit();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user