Yes but why rely on bits

This commit is contained in:
Félix Saparelli 2021-10-22 06:04:11 +13:00
parent 5c012c5b0c
commit 6d23339dea
No known key found for this signature in database
GPG Key ID: B948C4BAE44FC474
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ impl From<ExitStatus> for ProcessEnd {
fn from(es: ExitStatus) -> Self {
match es.code().map(NonZeroI32::try_from) {
None | Some(Err(_)) => Self::Success,
Some(Ok(code)) if code.get() & 0x80000000 != 0 => Self::Exception(code),
Some(Ok(code)) if code.get() < 0 => Self::Exception(code),
Some(Ok(code)) => Self::ExitError(code.into()),
}
}