* [PATCH v1 0/2] Document _Fork(3); update fork(2) for POSIX.1-2024
@ 2025-05-17 12:16 Alejandro Colomar
2025-05-17 12:16 ` [PATCH v1 1/2] man/man3/_Fork.3: Document _Fork() Alejandro Colomar
2025-05-17 12:16 ` [PATCH v1 2/2] man/: Update references to fork(2), and add references to _Fork(3), for POSIX.1-2024 Alejandro Colomar
0 siblings, 2 replies; 3+ messages in thread
From: Alejandro Colomar @ 2025-05-17 12:16 UTC (permalink / raw)
To: linux-man; +Cc: Alejandro Colomar
Hi!
I just realized about the existence of _Fork(). I've written a page
documenting it, and updated the existing documentation about fork(2).
Please check.
Have a lovely day!
Alex
Alejandro Colomar (2):
man/man3/_Fork.3: Document _Fork()
man/: Update references to fork(2), and add references to _Fork(3),
for POSIX.1-2024
man/man2/fork.2 | 7 ++++++-
man/man2/vfork.2 | 1 +
man/man3/_Fork.3 | 29 +++++++++++++++++++++++++++++
man/man7/signal-safety.7 | 14 +-------------
4 files changed, 37 insertions(+), 14 deletions(-)
create mode 100644 man/man3/_Fork.3
Range-diff against v0:
-: --------- > 1: a90d0f4c8 man/man3/_Fork.3: Document _Fork()
-: --------- > 2: 2e5dd2415 man/: Update references to fork(2), and add references to _Fork(3), for POSIX.1-2024
--
2.49.0
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH v1 1/2] man/man3/_Fork.3: Document _Fork() 2025-05-17 12:16 [PATCH v1 0/2] Document _Fork(3); update fork(2) for POSIX.1-2024 Alejandro Colomar @ 2025-05-17 12:16 ` Alejandro Colomar 2025-05-17 12:16 ` [PATCH v1 2/2] man/: Update references to fork(2), and add references to _Fork(3), for POSIX.1-2024 Alejandro Colomar 1 sibling, 0 replies; 3+ messages in thread From: Alejandro Colomar @ 2025-05-17 12:16 UTC (permalink / raw) To: linux-man; +Cc: Alejandro Colomar Signed-off-by: Alejandro Colomar <alx@kernel.org> --- man/man3/_Fork.3 | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 man/man3/_Fork.3 diff --git a/man/man3/_Fork.3 b/man/man3/_Fork.3 new file mode 100644 index 000000000..95b0bc61b --- /dev/null +++ b/man/man3/_Fork.3 @@ -0,0 +1,29 @@ +.\" Copyright, The authors of the Linux man-pages project +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH _Fork 3 (date) "Linux man-pages (unreleased)" +.SH NAME +_Fork \- create a child process +.SH LIBRARY +Standard C library +.RI ( libc ,\~ \-lc ) +.SH SYNOPSIS +.nf +.B #include <unistd.h> +.P +.B pid_t _Fork(void); +.fi +.SH DESCRIPTION +This function is equivalent to +.BR fork (2), +except that fork handlers registered with +.BR pthread_atfork (3) +are not called. +.SH STANDARDS +POSIX.1-2024. +.SH HISTORY +POSIX.1-2024. +.SH SEE ALSO +.BR fork (2), +.BR vfork (2) -- 2.49.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v1 2/2] man/: Update references to fork(2), and add references to _Fork(3), for POSIX.1-2024 2025-05-17 12:16 [PATCH v1 0/2] Document _Fork(3); update fork(2) for POSIX.1-2024 Alejandro Colomar 2025-05-17 12:16 ` [PATCH v1 1/2] man/man3/_Fork.3: Document _Fork() Alejandro Colomar @ 2025-05-17 12:16 ` Alejandro Colomar 1 sibling, 0 replies; 3+ messages in thread From: Alejandro Colomar @ 2025-05-17 12:16 UTC (permalink / raw) To: linux-man; +Cc: Alejandro Colomar Signed-off-by: Alejandro Colomar <alx@kernel.org> --- man/man2/fork.2 | 7 ++++++- man/man2/vfork.2 | 1 + man/man7/signal-safety.7 | 14 +------------- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/man/man2/fork.2 b/man/man2/fork.2 index b30c5af88..b70ec35b1 100644 --- a/man/man2/fork.2 +++ b/man/man2/fork.2 @@ -270,8 +270,12 @@ .SS C library/kernel differences established using .BR pthread_atfork (3). .\" and does some magic to ensure that getpid(2) returns the right value. +.SS Async-signal safety +.BR _Fork (3) +is an async-signal safe variant of +.BR fork (2). .SH STANDARDS -POSIX.1-2008. +POSIX.1-2024. .SH HISTORY POSIX.1-2001, SVr4, 4.3BSD. .SH NOTES @@ -332,6 +336,7 @@ .SH SEE ALSO .BR vfork (2), .BR wait (2), .BR daemon (3), +.BR _Fork (3), .BR pthread_atfork (3), .BR capabilities (7), .BR credentials (7) diff --git a/man/man2/vfork.2 b/man/man2/vfork.2 index 868538612..5e5ef0458 100644 --- a/man/man2/vfork.2 +++ b/man/man2/vfork.2 @@ -308,5 +308,6 @@ .SH SEE ALSO .BR execve (2), .BR _exit (2), .BR fork (2), +.BR _Fork (2), .BR unshare (2), .BR wait (2) diff --git a/man/man7/signal-safety.7 b/man/man7/signal-safety.7 index 251a319f4..08563293a 100644 --- a/man/man7/signal-safety.7 +++ b/man/man7/signal-safety.7 @@ -115,7 +115,7 @@ .SH DESCRIPTION \f[B]fdatasync\f[](2) \f[B]fexecve\f[](3) Added in POSIX.1-2008 \f[B]ffs\f[](3) Added in POSIX.1-2008 TC2 -\f[B]fork\f[](2) See notes below +\f[B]_Fork\f[](3) \f[B]fstat\f[](2) \f[B]fstatat\f[](2) Added in POSIX.1-2008 \f[B]fsync\f[](2) @@ -295,18 +295,6 @@ .SH DESCRIPTION .BR siglongjmp (3) and the program subsequently calls an unsafe function, then the behavior of the program is undefined. -.IP \[bu] -POSIX.1-2001 TC1 clarified -that if an application calls -.BR fork (2) -from a signal handler and any of the fork handlers registered by -.BR pthread_atfork (3) -calls a function that is not async-signal-safe, the behavior is undefined. -A future revision of the standard -.\" http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt -is likely to remove -.BR fork (2) -from the list of async-signal-safe functions. .\" .IP \[bu] Asynchronous signal handlers that call functions which are cancelation -- 2.49.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-17 12:16 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-05-17 12:16 [PATCH v1 0/2] Document _Fork(3); update fork(2) for POSIX.1-2024 Alejandro Colomar 2025-05-17 12:16 ` [PATCH v1 1/2] man/man3/_Fork.3: Document _Fork() Alejandro Colomar 2025-05-17 12:16 ` [PATCH v1 2/2] man/: Update references to fork(2), and add references to _Fork(3), for POSIX.1-2024 Alejandro Colomar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox