|
|
Message-ID: <20260923233818.25289-2-tg@trevorgross.com> Date: Wed, 23 Sep 2026 23:38:18 +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 1/2] man/man2/chroot.2: Document that chroot is AS-safe As discussed at [1], this is an async-signal-safe syscall wrapper. Link: https://lore.kernel.org/linux-man/5db76d666377410fc105b9d527cbcd9f9ef3b332.camel@posteo.net/T/#t [1] Signed-off-by: Trevor Gross <tg@...vorgross.com> --- man/man2/chroot.2 | 4 ++++ man/man7/signal-safety.7 | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/man/man2/chroot.2 b/man/man2/chroot.2 index fa579eb83..4372ab9c7 100644 --- a/man/man2/chroot.2 +++ b/man/man2/chroot.2 @@ -150,6 +150,10 @@ inherits its parent's root directory. The root directory is left unchanged by .BR execve (2). .P +.BR chroot() +is async-signal-safe: +it may be safely called within a signal handler. +.P The magic symbolic link, .IR /proc/ pid /root , can be used to discover a process's root directory; diff --git a/man/man7/signal-safety.7 b/man/man7/signal-safety.7 index f63d37f75..73d716751 100644 --- a/man/man7/signal-safety.7 +++ b/man/man7/signal-safety.7 @@ -280,6 +280,16 @@ T} \f[B]write\f[](2) .TE .P +Functions listed in the following table are not required to be +async-signal-safe by POSIX, but are safe on Linux: +.P +.TS +lb +lw(24n) l. +Function +\f[B]chroot\f[](2) +.TE +.P Notes: .IP \[bu] 3 POSIX.1-2001 and POSIX.1-2001 TC2 required the functions -- 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.