mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-22 18:22:11 +01:00
tests: Don’t assert for SA_NOCLDSTOP for non-SIGCHLD signals
`SA_NOCLDSTOP` is “meaningful only when establishing a handler for SIGCHLD” according to [`sigaction(2)`](man:sigaction(2)), so asserting that it’s set for all signals seems like a bad plan. In particular, it causes this unit test to fail on macOS. Indeed, [`kern.c` in macOS](https://opensource.apple.com/source/xnu/xnu-3789.70.16/bsd/kern/kern_sig.c.auto.html) only sets `SA_NOCLDSTOP` if the signal is `SIGCHLD`. Thanks to John Ralls for confirmation with the diagnosis. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Fixes: #3314
This commit is contained in:
parent
3ac632b406
commit
3bc225ed16
@ -520,7 +520,8 @@ test_signal (int signum)
|
||||
|
||||
g_assert_no_errno (sigaction (signum, NULL, &action));
|
||||
|
||||
g_assert_true (action.sa_flags & SA_NOCLDSTOP);
|
||||
if (signum == SIGCHLD)
|
||||
g_assert_true (action.sa_flags & SA_NOCLDSTOP);
|
||||
#ifdef SA_RESTART
|
||||
g_assert_true (action.sa_flags & SA_RESTART);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user