public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org,
	Christian Brauner <christian.brauner@ubuntu.com>
Subject: [PATCH 1/7] linux: Do set signal handler if it is already SIG_DFL
Date: Wed, 28 Sep 2022 17:46:28 -0300	[thread overview]
Message-ID: <20220928204634.3036650-2-adhemerval.zanella@linaro.org> (raw)
In-Reply-To: <20220928204634.3036650-1-adhemerval.zanella@linaro.org>

There is no need to issue another sigaction is the disposition is
already SIG_DFL.

Checked on x86_64-linux-gnu.
---
 sysdeps/unix/sysv/linux/spawni.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/unix/sysv/linux/spawni.c b/sysdeps/unix/sysv/linux/spawni.c
index ee843a2247..65ee03c804 100644
--- a/sysdeps/unix/sysv/linux/spawni.c
+++ b/sysdeps/unix/sysv/linux/spawni.c
@@ -129,7 +129,7 @@ __spawni_child (void *arguments)
 	  else
 	    {
 	      __libc_sigaction (sig, 0, &sa);
-	      if (sa.sa_handler == SIG_IGN)
+	      if (sa.sa_handler == SIG_IGN || sa.sa_handler == SIG_DFL)
 		continue;
 	      sa.sa_handler = SIG_DFL;
 	    }
-- 
2.34.1


  reply	other threads:[~2022-09-28 20:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-28 20:46 [PATCH 0/7] Optimize posix_spawn signal setup with clone3 Adhemerval Zanella
2022-09-28 20:46 ` Adhemerval Zanella [this message]
2022-09-28 20:46 ` [PATCH 2/7] linux: Add clone3 CLONE_CLEAR_SIGHAND optimization to posix_spawn Adhemerval Zanella
2022-09-28 20:46 ` [PATCH 3/7] powerpc64le: Add the clone3 wrapper Adhemerval Zanella
2022-09-28 20:46 ` [PATCH 4/7] aarch64: " Adhemerval Zanella
2022-09-28 20:46 ` [PATCH 5/7] s390x: " Adhemerval Zanella
2022-09-28 20:46 ` [PATCH 6/7] riscv: " Adhemerval Zanella
2022-09-28 20:46 ` [PATCH 7/7] Linux: optimize clone3 internal usage Adhemerval Zanella

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=20220928204634.3036650-2-adhemerval.zanella@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=christian.brauner@ubuntu.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).