mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 22:35:24 +00:00
fix bug I think I found while manually reviewing
This commit is contained in:
parent
53d8a25dab
commit
8f830207c4
@ -288,10 +288,8 @@ pub const ChildProcess = struct {
|
||||
else => |err| return windows.unexpectedError(err),
|
||||
}
|
||||
}
|
||||
if (wait_object_count == 0)
|
||||
return;
|
||||
|
||||
while (true) {
|
||||
while (wait_object_count > 0) {
|
||||
const status = windows.kernel32.WaitForMultipleObjects(wait_object_count, &wait_objects, 0, windows.INFINITE);
|
||||
if (status == windows.WAIT_FAILED) {
|
||||
switch (windows.kernel32.GetLastError()) {
|
||||
@ -315,11 +313,7 @@ pub const ChildProcess = struct {
|
||||
var read_bytes: u32 = undefined;
|
||||
if (windows.kernel32.GetOverlappedResult(handles[i], &overlapped[i], &read_bytes, 0) == 0) {
|
||||
switch (windows.kernel32.GetLastError()) {
|
||||
.BROKEN_PIPE => {
|
||||
if (wait_object_count == 0)
|
||||
break;
|
||||
continue;
|
||||
},
|
||||
.BROKEN_PIPE => continue,
|
||||
else => |err| return windows.unexpectedError(err),
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user