-
Notifications
You must be signed in to change notification settings - Fork 654
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
Don't consider 7th bit of signal to calculate signal for Linux platform. #549
Conversation
It's used for PTRACE_O_SYSGOOD, and creates a bad signal if on.
We need a way to return whether the bit is set though |
@@ -81,7 +81,7 @@ mod status { | |||
} | |||
|
|||
pub fn stop_signal(status: i32) -> Signal { | |||
Signal::from_c_int((status & 0xFF00) >> 8).unwrap() | |||
Signal::from_c_int((status & 0x7F00) >> 8).unwrap() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment explaining the mask?
Need to double check the cross-platform-ness of this fix, but it seems reasonable. Could you add something to the changelog for this? |
I'll add the comments/changelog entry when I get a chance (soon). I think the presence of a set 7th bit should be returned in the WaitStatus somehow, so that the caller can read it. What do you think would be the best way to represent this? I feel like adding it as a PtraceEvent would be the most straightforward to implement in a platform-specific way (both are exclusive to Linux). The architecture availability of this could be managed through enabling/disabling a particular value of the event enum used in PtraceEvent |
I'm not sure yet, as I'm not really familiar with |
@chaosagent We'd like to close this issue in favor of #566. Can you see if that PR works for your needs as well and seems like the correct path forward? |
I believe this was addressed by #566, so I'm closing this one. Please reopen or file a new one if not. |
It's used for PTRACE_O_SYSGOOD, and creates a bad signal if on.