Skip to content

Commit

Permalink
std.posix: Don't consider NOSYS a valid error from sigaction().
Browse files Browse the repository at this point in the history
I know of no "POSIX" system that does not have a sigaction() syscall.

Closes ziglang#20704.
  • Loading branch information
alexrp authored and Igor Stojkovic committed Aug 11, 2024
1 parent 2834766 commit 1294f7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/std/posix.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5681,7 +5681,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,
}
}
Expand Down

0 comments on commit 1294f7b

Please sign in to comment.