Skip to content

change sa_flags in sigaction to c_int on redox#4986

Merged
JohnTitor merged 1 commit intorust-lang:mainfrom
auronandace:correct-sigaction-redox
Feb 19, 2026
Merged

change sa_flags in sigaction to c_int on redox#4986
JohnTitor merged 1 commit intorust-lang:mainfrom
auronandace:correct-sigaction-redox

Conversation

@auronandace
Copy link
Contributor

Description

Changes sa_flags in sigaction to c_int for redox as per POSIX specification.

Sources

sa_flags in sigaction the rust signal header: https://gitlab.redox-os.org/redox-os/relibc/-/blob/ee6a6062cd6c6b57e7617559d988895d8a73ec64/src/header/signal/mod.rs#L56

sa_flags in sigaction in the C include file: https://gitlab.redox-os.org/redox-os/relibc/-/blob/28ffabebf629172a6c0c00ca56f73d72f25f7c6e/include/bits/signal.h#L19

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@rustbot label +stable-nominated

@rustbot rustbot added S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Feb 19, 2026
Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@JohnTitor JohnTitor added this pull request to the merge queue Feb 19, 2026
Merged via the queue into rust-lang:main with commit 939f009 Feb 19, 2026
51 checks passed
@auronandace auronandace deleted the correct-sigaction-redox branch February 20, 2026 07:44
JohnTitor pushed a commit to JohnTitor/libc that referenced this pull request Mar 8, 2026
@JohnTitor JohnTitor mentioned this pull request Mar 8, 2026
github-merge-queue bot pushed a commit that referenced this pull request Mar 8, 2026
(backport <#4986>)
(cherry picked from commit 939f009)
@JohnTitor JohnTitor added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Mar 8, 2026
@xtqqczze
Copy link
Contributor

xtqqczze commented Mar 8, 2026

breaking change?

error[E0308]: mismatched types
   --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/nix-0.30.1/src/sys/signal.rs:809:22
    |
809 |                 _ => (flags - SaFlags::SA_SIGINFO).bits(),
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `u64`
    |
help: you can convert a `u64` to an `i32` and panic if the converted value doesn't fit
    |
809 |                 _ => (flags - SaFlags::SA_SIGINFO).bits().try_into().unwrap(),
    |                                                          ++++++++++++++++++++

Issue opened downstream: nix-rust/nix#2750

@xtqqczze
Copy link
Contributor

xtqqczze commented Mar 9, 2026

Need to fix the types for the constants, e.g. SA_SIGINFO: c_int: opened #5009

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stable-applied This PR has been cherry-picked to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants