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