mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 08:45:52 +00:00
add additional errno (INTR) to tcset,getpgrp calls
Missed this originally because I was only able to trigger it when SA_RESTART was missing from the sigaction handlers. I'm unconvinced this is actually a sane way for stdlib to behave (see #15664). But this does duplicate the existing behavior throughout os.zig which IMO should be prioritized here.
This commit is contained in:
parent
78c8cb4225
commit
abfa215882
@ -6870,6 +6870,7 @@ pub fn tcgetpgrp(handle: fd_t) TermioGetPgrpError!pid_t {
|
||||
.SUCCESS => return pgrp,
|
||||
.BADF => unreachable,
|
||||
.INVAL => unreachable,
|
||||
.INTR => continue,
|
||||
.NOTTY => return error.NotATerminal,
|
||||
else => |err| return unexpectedErrno(err),
|
||||
}
|
||||
@ -6888,6 +6889,7 @@ pub fn tcsetpgrp(handle: fd_t, pgrp: pid_t) TermioSetPgrpError!void {
|
||||
.SUCCESS => return,
|
||||
.BADF => unreachable,
|
||||
.INVAL => unreachable,
|
||||
.INTR => continue,
|
||||
.NOTTY => return error.NotATerminal,
|
||||
.PERM => return TermioSetPgrpError.NotAPgrpMember,
|
||||
else => |err| return unexpectedErrno(err),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user