authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-01-29 17:13:17-08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-01-30 12:10:02-08:00
loga8608653032c7e904bc90454a0f8617f8c1a4267
treeb5066a961ce849920ad04994926787d141b9151c
parent9121ee5168e63a6a14af4b8e58a2c869db826e69

std.Build.Step: evalZigProcess handles EndOfStream

and a happy little info log when the process needs to be restarted

1 files changed, 2 insertions(+), 1 deletions(-)

lib/std/Build/Step.zig+2-1
...@@ -416,7 +416,8 @@ pub fn evalZigProcess(...@@ -416,7 +416,8 @@ pub fn evalZigProcess(
416 assert(watch);416 assert(watch);
417 if (std.Progress.have_ipc) if (zp.progress_ipc_fd) |fd| prog_node.setIpcFd(fd);417 if (std.Progress.have_ipc) if (zp.progress_ipc_fd) |fd| prog_node.setIpcFd(fd);
418 const result = zigProcessUpdate(s, zp, watch, web_server, gpa) catch |err| switch (err) {418 const result = zigProcessUpdate(s, zp, watch, web_server, gpa) catch |err| switch (err) {
419 error.BrokenPipe => {419 error.BrokenPipe, error.EndOfStream => |reason| {
420 std.log.info("{s} restart required: {t}", .{ argv[0], reason });
420 // Process restart required.421 // Process restart required.
421 const term = zp.child.wait(io) catch |e| {422 const term = zp.child.wait(io) catch |e| {
422 return s.fail("unable to wait for {s}: {t}", .{ argv[0], e });423 return s.fail("unable to wait for {s}: {t}", .{ argv[0], e });