authorgravatar for johnnymarler@gmail.comJonathan Marler <johnnymarler@gmail.com> 2022-02-06 06:05:40-07:00
committergravatar for johnnymarler@gmail.comJonathan Marler <johnnymarler@gmail.com> 2022-02-06 18:05:21-07:00
log8f830207c47987de9767130d54abff79c8ec257d
tree953d7ac19084986c3a021c7fcff80f7366633a64
parent53d8a25dab5ddcea16ac70cdcdf28cb3e4944cbb

fix bug I think I found while manually reviewing


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

lib/std/child_process.zig+2-8
......@@ -288,10 +288,8 @@ pub const ChildProcess = struct {
288288 else => |err| return windows.unexpectedError(err),
289289 }
290290 }
291 if (wait_object_count == 0)
292 return;
293291
294 while (true) {
292 while (wait_object_count > 0) {
295293 const status = windows.kernel32.WaitForMultipleObjects(wait_object_count, &wait_objects, 0, windows.INFINITE);
296294 if (status == windows.WAIT_FAILED) {
297295 switch (windows.kernel32.GetLastError()) {
......@@ -315,11 +313,7 @@ pub const ChildProcess = struct {
315313 var read_bytes: u32 = undefined;
316314 if (windows.kernel32.GetOverlappedResult(handles[i], &overlapped[i], &read_bytes, 0) == 0) {
317315 switch (windows.kernel32.GetLastError()) {
318 .BROKEN_PIPE => {
319 if (wait_object_count == 0)
320 break;
321 continue;
322 },
316 .BROKEN_PIPE => continue,
323317 else => |err| return windows.unexpectedError(err),
324318 }
325319 }