]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
man/: Update fork(2) for POSIX.1-2024, and add references to _Fork(3)
authorAlejandro Colomar <alx@kernel.org>
Sat, 17 May 2025 12:10:49 +0000 (14:10 +0200)
committerAlejandro Colomar <alx@kernel.org>
Sun, 27 Jul 2025 11:12:04 +0000 (13:12 +0200)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man2/fork.2
man/man2/vfork.2
man/man7/signal-safety.7

index c5eeaca1006ee11ab2cbf4b705f16435fcf1a911..f8148985941142edd19f0cc409791697a94e8a55 100644 (file)
@@ -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)
index bb8722826edb476091b78fec57623a0e2fdb24e6..a1025cac664aedb1f5ed8bd9b93765cee63ff87a 100644 (file)
@@ -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)
index c7d5ef10d2f88998e24abfbc8a7f70ef0ae00394..d844d2725a50965bc9eee29ef8782bb167e65029 100644 (file)
@@ -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