public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/posix_spawn-clone3] linux: Do not reset signal handler in posix_spawn if it is already SIG_DFL
@ 2022-11-29 21:20 Adhemerval Zanella
0 siblings, 0 replies; only message in thread
From: Adhemerval Zanella @ 2022-11-29 21:20 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f337a4430947ff13a36859220d86e671e90d6444
commit f337a4430947ff13a36859220d86e671e90d6444
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Wed Sep 28 17:26:42 2022 -0300
linux: Do not reset signal handler in posix_spawn if it is already SIG_DFL
There is no need to issue another sigaction is the disposition is
already SIG_DFL.
Checked on x86_64-linux-gnu.
Diff:
---
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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-29 21:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-29 21:20 [glibc/azanella/posix_spawn-clone3] linux: Do not reset signal handler in posix_spawn if it is already SIG_DFL Adhemerval Zanella
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).