1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-01 10:06:57 +03:00

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
This commit is contained in:
Adhemerval Zanella
2021-01-18 15:18:13 -03:00
parent de8995a2a0
commit 9a75654037
10 changed files with 380 additions and 299 deletions

View File

@ -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