std.posix: Don't consider NOSYS a valid error from sigaction().

I know of no "POSIX" system that does not have a sigaction() syscall.

Closes #20704.
This commit is contained in:
Alex Rønne Petersen 2024-07-21 13:25:21 +02:00
parent 08cddaf11c
commit 4d2868f242
No known key found for this signature in database

View File

@ -5661,7 +5661,7 @@ pub fn sigaltstack(ss: ?*stack_t, old_ss: ?*stack_t) SigaltstackError!void {
pub fn sigaction(sig: u6, noalias act: ?*const Sigaction, noalias oact: ?*Sigaction) error{OperationNotSupported}!void {
switch (errno(system.sigaction(sig, act, oact))) {
.SUCCESS => return,
.INVAL, .NOSYS => return error.OperationNotSupported,
.INVAL => return error.OperationNotSupported,
else => unreachable,
}
}