Skip to content

Commit 7ad7c56

Browse files
committed
[nextest-runner] display SIGQUIT and SIGILL
These numbers are common across many Unix platforms. Also remove some of the signal numbers that aren't shared by illumos.
1 parent 26634eb commit 7ad7c56

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

nextest-runner/src/helpers.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,17 @@ pub(crate) fn extract_abort_status(exit_status: ExitStatus) -> Option<AbortStatu
253253

254254
#[cfg(unix)]
255255
pub(crate) fn signal_str(signal: i32) -> Option<&'static str> {
256-
// These signal numbers are the same on at least Linux, macOS and FreeBSD.
256+
// These signal numbers are the same on at least Linux, macOS, FreeBSD and illumos.
257+
//
258+
// TODO: glibc has sigabbrev_np, and POSIX-1.2024 adds sig2str which has been available on
259+
// illumos for many years:
260+
// https://pubs.opengroup.org/onlinepubs/9799919799/functions/sig2str.html. We should use these
261+
// if available.
257262
match signal {
258263
1 => Some("HUP"),
259264
2 => Some("INT"),
265+
3 => Some("QUIT"),
266+
4 => Some("ILL"),
260267
5 => Some("TRAP"),
261268
6 => Some("ABRT"),
262269
8 => Some("FPE"),
@@ -265,10 +272,6 @@ pub(crate) fn signal_str(signal: i32) -> Option<&'static str> {
265272
13 => Some("PIPE"),
266273
14 => Some("ALRM"),
267274
15 => Some("TERM"),
268-
24 => Some("XCPU"),
269-
25 => Some("XFSZ"),
270-
26 => Some("VTALRM"),
271-
27 => Some("PROF"),
272275
_ => None,
273276
}
274277
}

0 commit comments

Comments
 (0)