about summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-01-18 15:18:13 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-06-24 10:02:06 -0300
commit9a7565403758f65c07fe3705e966381d9cfd35b6 (patch)
tree688958070ec772ee1b6c0621e289f49d758fed2a /sysdeps/unix
parentde8995a2a04163617c1a233b4b81356ef9f9741f (diff)
downloadglibc-9a7565403758f65c07fe3705e966381d9cfd35b6.tar.gz
glibc-9a7565403758f65c07fe3705e966381d9cfd35b6.tar.xz
glibc-9a7565403758f65c07fe3705e966381d9cfd35b6.zip
posix: Consolidate fork implementation
The Linux nptl implementation is used as base for generic fork
implementation to handle the internal locks and mutexes.  The
system specific bits are moved a new internal _Fork symbol.

(This new implementation will be used to provide a async-signal-safe
_Fork now that POSIX has clarified that fork might not be
async-signal-safe [1]).

For Hurd it means that the __nss_database_fork_prepare_parent and
__nss_database_fork_subprocess will be run in a slight different
order.

[1] https://austingroupbugs.net/view.php?id=62
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/arch-fork.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/arch-fork.h b/sysdeps/unix/sysv/linux/arch-fork.h
index 35d9397ff8..b846da08f9 100644
--- a/sysdeps/unix/sysv/linux/arch-fork.h
+++ b/sysdeps/unix/sysv/linux/arch-fork.h
@@ -19,6 +19,9 @@
 #ifndef __ARCH_FORK_H
 #define __ARCH_FORK_H
 
+#include <sysdep.h>
+#include <sched.h>
+#include <signal.h>
 #include <unistd.h>
 
 /* Call the clone syscall with fork semantic.  The CTID address is used