Skip to content

The libc::sigaction struct doesn't contain any way to access the underlying sa_handler field. #3111

Open
@dead-claudia

Description

@dead-claudia

Per https://pubs.opengroup.org/onlinepubs/007904875/functions/sigaction.html and https://man7.org/linux/man-pages/man2/sigaction.2.html, there's an sa_handler field for the sigaction struct. On Linux with some architectures, it may be aliased to sa_sigaction, but it's always there.

This is required in order to know what the previous signal handler was, and more importantly, whether it was previously ignored (.sa_handler == SIG_IGN) or set to the default disposition (.sa_handler == SIG_DFL).

Also, this allows omitting the SA_SIGINFO property of sa_flags, offering a simpler API for most common cases as it's just one (commonly-ignored) argument, not three.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bugE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.breakage-candidate

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions