|
|
Message-Id: <44aca4d502f6891df1587ed1c4c9b6a1@trevorgross.com> Date: Wed, 23 Sep 2026 00:53:16 +0000 From: <tg@...vorgross.com> To: <linux-man@...r.kernel.org>, <musl@...ts.openwall.com>, <libc-alpha@...rceware.org> Subject: async-signal-safety of chroot Hi everyone, Is `chroot` async-signal-safe? It is a somewhat popular pattern to `fork`, `chroot`, then `exec`. However, only AS-safe functions may be called between `fork` and `exec` (stated at [1]) but the manual entry for `chroot` makes no such mention [2]. signal-safety(7) [3] only covers POSIX, so it is also not listed there. The rather old POSIX edition that last specified chroot also does not mark it AS-safe [4], [5]. Is code using this pattern buggy, or is it just missing documentation? I expect it's the latter but it would be nice to confirm either way. Thanks, Trevor [1]: https://man7.org/linux/man-pages/man2/fork.2.html [2]: https://man7.org/linux/man-pages/man2/chroot.2.html [3]: https://man7.org/linux/man-pages/man7/signal-safety.7.html [4]: https://pubs.opengroup.org/onlinepubs/7908799/xsh/chroot.html [5]: https://pubs.opengroup.org/onlinepubs/7908799/xsh/sigaction.html
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.