From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: [PATCH v4 0/4] Add _Fork implementation
Date: Wed, 23 Jun 2021 15:43:50 -0300 [thread overview]
Message-ID: <20210623184354.395316-1-adhemerval.zanella@linaro.org> (raw)
Austin Group issue 62 [1] dropped the async-signal-safe requirement
for fork and provided a async-signal-safe _Fork replacement that
does not run the atfork handlers. It will be included in the next
POSIX standard.
It allow close a long standing issue that ask fork to be AS-safe
(BZ#4737) now that we provide a similar call.
The first patch consolidates the fork implementation between Linux
and Hurd, moving the arch-specifics bits to the system specific
fork.h header. The process spawn core is moved to the internal
symbol _Fork, which will be exported in the final patch.
Second patch a minor issue with atfork handler.
Third patch consolidates the pthread_atfork implementation over
Linux and Hurd.
The final patch exports the new _Fork symbol and add some regression
tests.
*** BLURB HERE ***
Adhemerval Zanella (4):
posix: Consolidate fork implementation
posix: Do not clobber errno by atfork handlers
Consolidate pthread_atfork
posix: Add _Fork [BZ #4737]
NEWS | 8 +
htl/Makefile | 4 +-
include/unistd.h | 4 +
malloc/Makefile | 3 +
malloc/tst-mallocfork3.c | 213 ++++++++++++++
manual/process.texi | 39 ++-
nptl/Makefile | 1 -
posix/Makefile | 6 +-
posix/Versions | 1 +
posix/_Fork.c | 34 +++
posix/fork.c | 124 +++++++-
posix/tst-_Fork.c | 218 +++++++++++++++
posix/unistd.h | 7 +
.../{htl/old_pt-atfork.c => generic/fork.h} | 26 +-
sysdeps/htl/pt-atfork.c | 41 ---
sysdeps/htl/pthread_atfork_compat.h | 4 +
sysdeps/mach/hurd/{fork.c => _Fork.c} | 21 +-
sysdeps/nptl/_Fork.c | 52 ++++
sysdeps/nptl/fork.c | 264 ------------------
sysdeps/nptl/fork.h | 148 ++++++++++
sysdeps/nptl/pthread_atfork_compat.h | 4 +
sysdeps/pthread/Makefile | 4 +-
{nptl => sysdeps/pthread}/pthread_atfork.c | 1 +
.../pthread/pthread_atfork_compat.c | 8 +-
sysdeps/unix/sysv/linux/aarch64/libc.abilist | 1 +
sysdeps/unix/sysv/linux/alpha/libc.abilist | 1 +
sysdeps/unix/sysv/linux/arc/libc.abilist | 1 +
sysdeps/unix/sysv/linux/arch-fork.h | 3 +
sysdeps/unix/sysv/linux/arm/be/libc.abilist | 1 +
sysdeps/unix/sysv/linux/arm/le/libc.abilist | 1 +
sysdeps/unix/sysv/linux/csky/libc.abilist | 1 +
sysdeps/unix/sysv/linux/hppa/libc.abilist | 1 +
sysdeps/unix/sysv/linux/i386/libc.abilist | 1 +
sysdeps/unix/sysv/linux/ia64/libc.abilist | 1 +
.../sysv/linux/m68k/coldfire/libc.abilist | 1 +
.../unix/sysv/linux/m68k/m680x0/libc.abilist | 1 +
.../sysv/linux/microblaze/be/libc.abilist | 1 +
.../sysv/linux/microblaze/le/libc.abilist | 1 +
.../sysv/linux/mips/mips32/fpu/libc.abilist | 1 +
.../sysv/linux/mips/mips32/nofpu/libc.abilist | 1 +
.../sysv/linux/mips/mips64/n32/libc.abilist | 1 +
.../sysv/linux/mips/mips64/n64/libc.abilist | 1 +
sysdeps/unix/sysv/linux/nios2/libc.abilist | 1 +
.../linux/powerpc/powerpc32/fpu/libc.abilist | 1 +
.../powerpc/powerpc32/nofpu/libc.abilist | 1 +
.../linux/powerpc/powerpc64/be/libc.abilist | 1 +
.../linux/powerpc/powerpc64/le/libc.abilist | 1 +
.../unix/sysv/linux/riscv/rv32/libc.abilist | 1 +
.../unix/sysv/linux/riscv/rv64/libc.abilist | 1 +
.../unix/sysv/linux/s390/s390-32/libc.abilist | 1 +
.../unix/sysv/linux/s390/s390-64/libc.abilist | 1 +
sysdeps/unix/sysv/linux/sh/be/libc.abilist | 1 +
sysdeps/unix/sysv/linux/sh/le/libc.abilist | 1 +
.../sysv/linux/sparc/sparc32/libc.abilist | 1 +
.../sysv/linux/sparc/sparc64/libc.abilist | 1 +
.../unix/sysv/linux/x86_64/64/libc.abilist | 1 +
.../unix/sysv/linux/x86_64/x32/libc.abilist | 1 +
57 files changed, 898 insertions(+), 372 deletions(-)
create mode 100644 malloc/tst-mallocfork3.c
create mode 100644 posix/_Fork.c
create mode 100644 posix/tst-_Fork.c
rename sysdeps/{htl/old_pt-atfork.c => generic/fork.h} (61%)
delete mode 100644 sysdeps/htl/pt-atfork.c
create mode 100644 sysdeps/htl/pthread_atfork_compat.h
rename sysdeps/mach/hurd/{fork.c => _Fork.c} (98%)
create mode 100644 sysdeps/nptl/_Fork.c
delete mode 100644 sysdeps/nptl/fork.c
create mode 100644 sysdeps/nptl/fork.h
create mode 100644 sysdeps/nptl/pthread_atfork_compat.h
rename {nptl => sysdeps/pthread}/pthread_atfork.c (98%)
rename nptl/old_pthread_atfork.c => sysdeps/pthread/pthread_atfork_compat.c (84%)
--
2.30.2
next reply other threads:[~2021-06-23 18:43 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-23 18:43 Adhemerval Zanella [this message]
2021-06-23 18:43 ` [PATCH v4 1/4] posix: Consolidate fork implementation Adhemerval Zanella
2021-06-24 8:15 ` Florian Weimer
2021-06-24 11:32 ` Adhemerval Zanella
2021-06-23 18:43 ` [PATCH v4 2/4] posix: Do not clobber errno by atfork handlers Adhemerval Zanella
2021-06-24 8:19 ` Florian Weimer
2021-06-24 11:05 ` Adhemerval Zanella
2021-06-24 11:19 ` Florian Weimer
2021-06-24 11:32 ` Adhemerval Zanella
2021-06-23 18:43 ` [PATCH v4 3/4] Consolidate pthread_atfork Adhemerval Zanella
2021-06-24 8:22 ` Florian Weimer
2021-06-24 11:32 ` Adhemerval Zanella
2021-06-23 18:43 ` [PATCH v4 4/4] posix: Add _Fork [BZ #4737] Adhemerval Zanella
2021-06-24 8:47 ` Florian Weimer
2021-06-24 13:34 ` Adhemerval Zanella
2021-06-28 8:52 ` Florian Weimer
2021-06-28 18:10 ` 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=20210623184354.395316-1-adhemerval.zanella@linaro.org \
--to=adhemerval.zanella@linaro.org \
--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).