commit: 7d25d750485b7d71b0ba43a74e429245fcca05a8
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Mon Jun 9 10:14:39 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jun 11 03:26:16 2025 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=7d25d750
isolated-functions.sh: better document the behaviour of find0()
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
bin/isolated-functions.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index 874c6c8eea..722d92adb7 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -693,8 +693,10 @@ contains_word() {
}
# Invoke GNU find(1) in such a way that the paths to be searched are consumed
-# as a null-terminated list from STDIN. The positional parameters shall be
-# conveyed verbatim and treated as options and/or primaries.
+# as a list of one or more null-terminated records from STDIN. The positional
+# parameters shall be conveyed verbatim and are guaranteed to be treated as
+# options and/or primaries, provided that the version of GNU findutils is 4.9.0
+# or greater. For older versions, no such guarantee is made.
find0() {
if printf '/\0' | find -files0-from - -maxdepth 0 &>/dev/null; then
find0() {