Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SIGRTMIN and SIGRTMAX constants #1143

Open
kacejot opened this issue Oct 24, 2019 · 4 comments
Open

Add SIGRTMIN and SIGRTMAX constants #1143

kacejot opened this issue Oct 24, 2019 · 4 comments

Comments

@kacejot
Copy link

kacejot commented Oct 24, 2019

Or at least remove Error on Signal::from_c_int, if signal is not between 0 and NSIG, so I can pass custom signals. Option here is also excess.

@kacejot kacejot closed this as completed Oct 24, 2019
@kacejot kacejot reopened this Oct 24, 2019
@kacejot
Copy link
Author

kacejot commented Oct 24, 2019

I use transmute for my purpose now and it works fine, but I wish getting rid of unsafe block.

let signal: Signal = unsafe { std::mem::transmute(signal::SIGRTMIN() + 1) };
match kill(pid, signal) {
    ...
}

@asomers
Copy link
Member

asomers commented Dec 1, 2019

I think this would be a reasonable change. However, you'll have to add support to libc first. And you'll need to deal with the fact that SIGRTMIN is a constant on some platforms and a function on others.

@mkroening
Copy link
Contributor

mkroening commented Aug 21, 2021

FYI, SIGRTMIN and SIGRTMAX have been added to libc in rust-lang/libc#2304.

@mkroening
Copy link
Contributor

This is related to #495.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants