From: Alejandro Colomar Date: Sat, 17 May 2025 12:10:49 +0000 (+0200) Subject: man/: Update fork(2) for POSIX.1-2024, and add references to _Fork(3) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32724569515bd8550ce29401d29663b11fdec30c;p=thirdparty%2Fman-pages.git man/: Update fork(2) for POSIX.1-2024, and add references to _Fork(3) Signed-off-by: Alejandro Colomar --- diff --git a/man/man2/fork.2 b/man/man2/fork.2 index c5eeaca10..f81489859 100644 --- a/man/man2/fork.2 +++ b/man/man2/fork.2 @@ -270,8 +270,12 @@ The glibc wrapper invokes any fork handlers that have been 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 @@ main(void) .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 bb8722826..a1025cac6 100644 --- a/man/man2/vfork.2 +++ b/man/man2/vfork.2 @@ -308,5 +308,6 @@ are allowed and input attempts result in an end-of-file indication." .BR execve (2), .BR _exit (2), .BR fork (2), +.BR _Fork (3), .BR unshare (2), .BR wait (2) diff --git a/man/man7/signal-safety.7 b/man/man7/signal-safety.7 index c7d5ef10d..d844d2725 100644 --- a/man/man7/signal-safety.7 +++ b/man/man7/signal-safety.7 @@ -115,7 +115,7 @@ T} \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 @@ or .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