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:
Gregory Mullen 2023-05-11 13:10:20 -07:00 committed by Andrew Kelley
parent 78c8cb4225
commit abfa215882

View File

@ -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),