The `libc::sigaction` struct doesn't contain any way to access the underlying `sa_handler` field.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.6k
- Forks
- 1.3k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 69
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the platform-specific libc::sigaction definitions with the POSIX and Linux sigaction documentation linked in the issue, paying attention to architectures where sa_handler is aliased to sa_sigaction. The work is done when callers can inspect the previous handler, including SIG_IGN and SIG_DFL, without requiring SA_SIGINFO.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100