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

Convert libc::SIGABRT to i32 #232

Open
wants to merge 1 commit into
base: esp-1.80.0.0
Choose a base branch
from

Conversation

Sid9017
Copy link

@Sid9017 Sid9017 commented Aug 28, 2024

#231
Temporarily use a private variable _sigabrt to hold the value of status.signal() for comparison

let result = match status.code() {
Some(TR_OK) => TestResult::TrOk,
#[cfg(windows)]
Some(STATUS_ABORTED) => TestResult::TrFailed,
#[cfg(unix)]
None => match status.signal() {
Some(libc::SIGABRT) => TestResult::TrFailed,
Some(_sigabrt) => TestResult::TrFailed,

Choose a reason for hiding this comment

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

This doesn't do what you want. It's a pattern, so it defines a new variable named _sigabrt. https://doc.rust-lang.org/beta/book/ch18-03-pattern-syntax.html

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

Successfully merging this pull request may close these issues.

2 participants