Skip to content

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

Closed

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?

Activity

  1. added
    standard library
    on Jul 21, 2024
  2. added this to the 0.14.0 milestone on Jul 21, 2024
  3. added
    enhancement
    on Jul 23, 2024
  4. added a commit that references this issue on Aug 11, 2024
    1294f7b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementstandard library

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions