diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-10-24 21:13:05 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-10-24 21:13:05 -0400 |
| commit | 55c282ed51361b54fbcd6d240467d31013817c6d (patch) | |
| tree | 25adfc96858322496232e7019abee88292d589ec /lib/std/os.zig | |
| parent | f6367a07513271a83944f86c8b237427887efeb2 (diff) | |
| download | zig-55c282ed51361b54fbcd6d240467d31013817c6d.tar.gz zig-55c282ed51361b54fbcd6d240467d31013817c6d.zip | |
os.dup2: handle EBAF
Diffstat (limited to 'lib/std/os.zig')
| -rw-r--r-- | lib/std/os.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/std/os.zig b/lib/std/os.zig index d239f198f4..a1fe051997 100644 --- a/lib/std/os.zig +++ b/lib/std/os.zig @@ -663,7 +663,8 @@ pub fn dup2(old_fd: fd_t, new_fd: fd_t) !void { 0 => return, EBUSY, EINTR => continue, EMFILE => return error.ProcessFdQuotaExceeded, - EINVAL => unreachable, + EINVAL => unreachable, // invalid parameters passed to dup2 + EBADF => unreachable, // always a race condition else => |err| return unexpectedErrno(err), } } |
