public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc] posix: Ensure the initial signal disposition for tst-spawn7 Date: Wed, 8 Mar 2023 13:09:52 +0000 (GMT) [thread overview] Message-ID: <20230308130952.A07913850869@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=65387e48097077c71ed527457c59ba59f3a1f3ee commit 65387e48097077c71ed527457c59ba59f3a1f3ee Author: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org> Date: Tue Mar 7 13:31:52 2023 -0300 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> Diff: --- posix/tst-spawn7.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/posix/tst-spawn7.c b/posix/tst-spawn7.c index fedb09fb94..fb06915cb7 100644 --- a/posix/tst-spawn7.c +++ b/posix/tst-spawn7.c @@ -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);
reply other threads:[~2023-03-08 13:09 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230308130952.A07913850869@sourceware.org \ --to=azanella@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).