| ... | ... | @@ -288,10 +288,8 @@ pub const ChildProcess = struct { |
| 288 | 288 | else => |err| return windows.unexpectedError(err), |
| 289 | 289 | } |
| 290 | 290 | } |
| 291 | | if (wait_object_count == 0) |
| 292 | | return; |
| 293 | 291 | |
| 294 | | while (true) { |
| 292 | while (wait_object_count > 0) { |
| 295 | 293 | const status = windows.kernel32.WaitForMultipleObjects(wait_object_count, &wait_objects, 0, windows.INFINITE); |
| 296 | 294 | if (status == windows.WAIT_FAILED) { |
| 297 | 295 | switch (windows.kernel32.GetLastError()) { |
| ... | ... | @@ -315,11 +313,7 @@ pub const ChildProcess = struct { |
| 315 | 313 | var read_bytes: u32 = undefined; |
| 316 | 314 | if (windows.kernel32.GetOverlappedResult(handles[i], &overlapped[i], &read_bytes, 0) == 0) { |
| 317 | 315 | switch (windows.kernel32.GetLastError()) { |
| 318 | | .BROKEN_PIPE => { |
| 319 | | if (wait_object_count == 0) |
| 320 | | break; |
| 321 | | continue; |
| 322 | | }, |
| 316 | .BROKEN_PIPE => continue, |
| 323 | 317 | else => |err| return windows.unexpectedError(err), |
| 324 | 318 | } |
| 325 | 319 | } |