mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
posix: Ensure the initial signal disposition for tst-spawn7
To avoid possible failure if any parent set any initial signal disposition as SIG_IGN (for instance if the testcase is issued with nohup). Checked on x86_64-linux-gnu. Tested-by: Florian Weimer <fweimer@redhat.com> Reviewed-by: Florian Weimer <fweimer@redhat.com>
This commit is contained in:
parent
d03094649d
commit
65387e4809
@ -99,6 +99,12 @@ dummy_sa_handler (int signal)
|
||||
static void
|
||||
do_test_signals (void)
|
||||
{
|
||||
/* Ensure the initial signal disposition, ignore EINVAL for internal
|
||||
signal such as SIGCANCEL. */
|
||||
for (int sig = 1; sig < _NSIG; ++sig)
|
||||
sigaction (sig, &(struct sigaction) { .sa_handler = SIG_DFL,
|
||||
.sa_flags = 0 }, NULL);
|
||||
|
||||
{
|
||||
/* Check if all signals handler are set to SIG_DFL on spawned process. */
|
||||
spawn_signal_test ("SIG_DFL", NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user