mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-20 03:42:44 +08:00
test_helper: Limit signal numbers more
This just produced a spurious "Unknown signal" error on NetBSD and OpenBSD, and the number picked was arbitrary. So let's just use the maximum that appears to work everywhere. (I will hate this if I test it elsewhere and need to reduce it to 62) (This is a squashed commit, I did indeed hate it when I moved from NetBSD to OpenBSD)
This commit is contained in:
parent
9d1129f14c
commit
3af715d36f
|
@ -77,9 +77,10 @@ static void print_blocked_signals() {
|
|||
exit(EXIT_FAILURE);
|
||||
}
|
||||
// There is no obviously portable way to get the maximum number of signals.
|
||||
// Here we limit it to 64 because strsignal on Linux returns "Unknown signal" for anything
|
||||
// Here we limit it to 32 because strsignal on OpenBSD returns "Unknown signal" for anything
|
||||
// above.
|
||||
for (int sig = 1; sig < 65; sig++) {
|
||||
// NetBSD taps out at 63, Linux at 64.
|
||||
for (int sig = 1; sig < 33; sig++) {
|
||||
if (sigismember(&sigs, sig)) {
|
||||
if (const char *s = strsignal(sig)) {
|
||||
fprintf(stderr, "%s", s);
|
||||
|
|
Loading…
Reference in New Issue
Block a user