| ... | ... | @@ -13070,11 +13070,6 @@ fn processSpawnPosix(userdata: ?*anyopaque, options: process.SpawnOptions) proce |
| 13070 | 13070 | const child_err: process.SpawnError = @errorCast(@errorFromInt(child_err_int)); |
| 13071 | 13071 | return child_err; |
| 13072 | 13072 | } else |read_err| switch (read_err) { |
| 13073 | | error.Canceled => { |
| 13074 | | // We don't want to wait for the error to be reported, but we do |
| 13075 | | // need to return the child so that it can be cleaned up. |
| 13076 | | recancelInner(); |
| 13077 | | }, |
| 13078 | 13073 | error.EndOfStream => { |
| 13079 | 13074 | // Write end closed by CLOEXEC at the time of the `execvpe` call, |
| 13080 | 13075 | // indicating success. |
| ... | ... | @@ -13378,22 +13373,17 @@ fn writeIntFd(fd: posix.fd_t, value: ErrInt) !void { |
| 13378 | 13373 | fn readIntFd(fd: posix.fd_t) !ErrInt { |
| 13379 | 13374 | var buffer: [8]u8 = undefined; |
| 13380 | 13375 | var i: usize = 0; |
| 13381 | | const syscall: Syscall = try .start(); |
| 13382 | 13376 | while (true) { |
| 13383 | 13377 | const rc = posix.system.read(fd, buffer[i..].ptr, buffer.len - i); |
| 13384 | 13378 | switch (posix.errno(rc)) { |
| 13385 | 13379 | .SUCCESS => { |
| 13386 | | syscall.finish(); |
| 13387 | 13380 | const n: usize = @intCast(rc); |
| 13388 | 13381 | if (n == 0) break; |
| 13389 | 13382 | i += n; |
| 13390 | 13383 | continue; |
| 13391 | 13384 | }, |
| 13392 | | .INTR => { |
| 13393 | | try syscall.checkCancel(); |
| 13394 | | continue; |
| 13395 | | }, |
| 13396 | | else => |err| return syscall.unexpectedErrno(err), |
| 13385 | .INTR => continue, |
| 13386 | else => |err| return posix.unexpectedErrno(err), |
| 13397 | 13387 | } |
| 13398 | 13388 | } |
| 13399 | 13389 | if (buffer.len - i != 0) return error.EndOfStream; |