authorgravatar for _@gr.htGregory Mullen <_@gr.ht> 2023-05-11 13:10:20-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-06-16 22:02:36-07:00
logabfa2158820c963cddc0c861168b16021d846825
tree421b9c0bc3509b7c1ddfb4aeefcaf2459efe9b2f
parent78c8cb4225c3c3d429764151ad703a4bfa67d75a

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.

1 files changed, 2 insertions(+), 0 deletions(-)

lib/std/os.zig+2
......@@ -6870,6 +6870,7 @@ pub fn tcgetpgrp(handle: fd_t) TermioGetPgrpError!pid_t {
68706870 .SUCCESS => return pgrp,
68716871 .BADF => unreachable,
68726872 .INVAL => unreachable,
6873 .INTR => continue,
68736874 .NOTTY => return error.NotATerminal,
68746875 else => |err| return unexpectedErrno(err),
68756876 }
......@@ -6888,6 +6889,7 @@ pub fn tcsetpgrp(handle: fd_t, pgrp: pid_t) TermioSetPgrpError!void {
68886889 .SUCCESS => return,
68896890 .BADF => unreachable,
68906891 .INVAL => unreachable,
6892 .INTR => continue,
68916893 .NOTTY => return error.NotATerminal,
68926894 .PERM => return TermioSetPgrpError.NotAPgrpMember,
68936895 else => |err| return unexpectedErrno(err),