Skip to content

Support SIGRTMIN+n signals.#1292

Merged
sunfishcode merged 10 commits intomainfrom
sunfishcode/sigrt
Jan 28, 2025
Merged

Support SIGRTMIN+n signals.#1292
sunfishcode merged 10 commits intomainfrom
sunfishcode/sigrt

Conversation

@sunfishcode
Copy link
Copy Markdown
Member

Change Signal from an enum to a struct wrapper around an i32 so that it can accomodate values it doesn't know about statically, and add APIs for constructing and working with SIGRTMIN+n signal values.

This requires making Signal::from_raw depend on a new "use-libc-sigrt" feature, as it depends on being able to call into libc. This also adds Signal::from_raw_unchecked which does not call into libc and is unsafe.

Fixes #1249.

Change `Signal` from an `enum` to a `struct` wrapper around an `i32`
so that it can accomodate values it doesn't know about statically,
and add APIs for constructing and working with `SIGRTMIN+n` signal
values.

This requires making `Signal::from_raw` depend on a new "use-libc-sigrt"
feature, as it depends on being able to call into libc. This also adds
`Signal::from_raw_unchecked` which does not call into libc and is
unsafe.

Fixes #1249.
@sunfishcode sunfishcode marked this pull request as ready for review January 27, 2025 18:07
@sunfishcode sunfishcode added the semver bump Issues that will require a semver-incompatible fix label Jan 27, 2025
@joshtriplett
Copy link
Copy Markdown
Member

This looks great, thank you.

@sunfishcode sunfishcode merged commit fc2a014 into main Jan 28, 2025
@sunfishcode sunfishcode deleted the sunfishcode/sigrt branch January 28, 2025 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver bump Issues that will require a semver-incompatible fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Signal should support arbitrary signals

2 participants