further repair to unix-signal test

This commit is contained in:
Matthew Flatt 2021-02-11 19:28:19 -07:00
parent 3e2245d40e
commit 8a914d9338

View File

@ -12,9 +12,13 @@ int main()
/* SIGPROF tends to be near the end of the range of signal IDs */
for (i = 1; i < SIGPROF; i++) {
sigaction(i, NULL, &sa);
if (sa.sa_handler != SIG_DFL)
return 1;
if (sigaction(i, NULL, &sa) == 0) {
if (sa.sa_handler != SIG_DFL)
return 1;
} else {
/* sigaction sometimes isn't allowed at all on SIGKILL,
for example, so ignore that failure */
}
}
sigemptyset(&set);