public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
Cc: Adhemerval Zanella <adhemerval.zanella@linaro.org>,
	"H.J. Lu" <hjl.tools@gmail.com>
Subject: Re: [PATCH] posix: Ensure the initial signal disposition for tst-spawn7
Date: Wed, 08 Mar 2023 10:44:07 +0100	[thread overview]
Message-ID: <87v8jbshlk.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20230307163152.2509362-1-adhemerval.zanella@linaro.org> (Adhemerval Zanella via Libc-alpha's message of "Tue, 7 Mar 2023 13:31:52 -0300")

* Adhemerval Zanella via Libc-alpha:

> To avoid possible failure if any parent set any initial signal
> disposition as SIG_IGN.
>
> Checked on x86_64-linux-gnu.
> ---
>  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);

Finally found out what's causing my failure: running the test suite with
“nohup”.  Maybe you could mention this in the comment?  Anyway, the
patch is fixing things.

I suspect H.J. is doing the same. 8-)

Tested-by: Florian Weimer <fweimer@redhat.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>

Thanks,
Florian


  reply	other threads:[~2023-03-08  9:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 16:31 Adhemerval Zanella
2023-03-08  9:44 ` Florian Weimer [this message]
2023-03-08 13:08   ` Adhemerval Zanella Netto

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=87v8jbshlk.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@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: link
Be 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).