diff options
author | Adhemerval Zanella Netto <adhemerval.zanella@linaro.org> | 2023-01-12 10:58:51 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-02-01 08:42:11 -0300 |
commit | 2053c11331991818882f7cf023ed2ce4ff44b274 (patch) | |
tree | b1edaafb8036456c39bff1756ed8827922c0b3b5 /posix/Makefile | |
parent | 2290cf73cce1292d9345a8183fd29ae3994a9481 (diff) | |
download | glibc-2053c11331991818882f7cf023ed2ce4ff44b274.tar.gz |
linux: Add clone3 CLONE_CLEAR_SIGHAND optimization to posix_spawn
The clone3 flag resets all signal handlers of the child not set to
SIG_IGN to SIG_DFL. It allows to skip most of the sigaction calls
to setup child signal handling, where previously a posix_spawn
had to issue 2 times NSIG sigaction calls (one to obtain the current
disposition and another to set either SIG_DFL or SIG_IGN).
With POSIX_SPAWN_SETSIGDEF the child will setup the signal for the case
where the disposition is SIG_IGN.
The code must handle the fallback where clone3 is not available. This is
done by splitting __clone_internal_fallback from __clone_internal.
Checked on x86_64-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'posix/Makefile')
-rw-r--r-- | posix/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/posix/Makefile b/posix/Makefile index 38a4279599..7e4f252a40 100644 --- a/posix/Makefile +++ b/posix/Makefile @@ -109,7 +109,7 @@ tests := test-errno tstgetopt testfnm runtests runptests \ tst-glob-tilde test-ssize-max tst-spawn4 bug-regex37 \ bug-regex38 tst-regcomp-truncated tst-spawn-chdir \ tst-wordexp-nocmd tst-execveat tst-spawn5 \ - tst-sched_getaffinity tst-spawn6 + tst-sched_getaffinity tst-spawn6 tst-spawn7 # Test for the glob symbol version that was replaced in glibc 2.27. ifeq ($(have-GLIBC_2.26)$(build-shared),yesyes) @@ -291,6 +291,7 @@ tst-spawn-ARGS = -- $(host-test-program-cmd) tst-spawn-static-ARGS = $(tst-spawn-ARGS) tst-spawn5-ARGS = -- $(host-test-program-cmd) tst-spawn6-ARGS = -- $(host-test-program-cmd) +tst-spawn7-ARGS = -- $(host-test-program-cmd) tst-dir-ARGS = `pwd` `cd $(common-objdir)/$(subdir); pwd` `cd $(common-objdir); pwd` $(objpfx)tst-dir tst-chmod-ARGS = $(objdir) tst-vfork3-ARGS = --test-dir=$(objpfx) |