Skip to content

std.posix should probably not pretend that sigaction can actually be missing #20704

Closed
@alexrp

Description

@alexrp

zig/lib/std/posix.zig

Lines 5660 to 5667 in 8267929

/// Examine and change a signal action.
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,
else => unreachable,
}
}

Why are we pretending that sigaction can be missing (NOSYS) on POSIX? This is an extremely fundamental function. I've worked on several projects that needed to run on bizarre and broken "POSIX-ish" systems, and I don't recall ever having to worry that sigaction of all things was missing.

Any objections to removing NOSYS from that prong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSolving this issue will likely involve adding new logic or components to the codebase.standard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions