Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260923233818.25289-3-tg@trevorgross.com>
Date: Wed, 23 Sep 2026 23:38:19 +0000
From: Trevor Gross <tg@...vorgross.com>
To: Alejandro Colomar <alx@...nel.org>
Cc: linux-man@...r.kernel.org,
	libc-alpha@...rceware.org,
	musl@...ts.openwall.com,
	Trevor Gross <tg@...vorgross.com>
Subject: [PATCH 2/2] man/man2/fork.2: Document glibc and musl relaxed fork->exec AS requirements

Link: https://lore.kernel.org/linux-man/20260923013428.GT23438@brightrain.aerifal.cx/ [1]
Link: https://git.musl-libc.org/cgit/musl/commit/?id=167390f05564e0a4d3fcb4329377fd7743267560
Signed-off-by: Trevor Gross <tg@...vorgross.com>
---
 man/man2/fork.2 | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/man/man2/fork.2 b/man/man2/fork.2
index fc78f786b..336c17448 100644
--- a/man/man2/fork.2
+++ b/man/man2/fork.2
@@ -147,10 +147,17 @@ may be helpful for dealing with problems that this can cause.
 After a
 .BR fork ()
 in a multithreaded program,
-the child can safely call only async-signal-safe functions (see
+POSIX specifies that the child can safely call only async-signal-safe
+functions (see
 .BR signal\-safety (7))
-until such time as it calls
+until it calls
 .BR execve (2).
+On glibc and musl libc, this is relaxed;
+it is safe to call non-async-signal-safe functions in the time between
+.BR fork ()
+and
+.BR exec ()
+\&.
 .IP \[bu]
 The child inherits copies of the parent's set of open file descriptors.
 Each file descriptor in the child refers to the same
-- 
2.50.1 (Apple Git-155)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.