public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fts.3: note fts_open() behaviour with empty strings
@ 2023-04-11  2:21 наб
  2023-04-11 14:22 ` Alejandro Colomar
  0 siblings, 1 reply; 4+ messages in thread
From: наб @ 2023-04-11  2:21 UTC (permalink / raw)
  To: Alejandro Colomar (man-pages); +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 809 bytes --]

This is undocumented in BSD, too, and present in the original SCCS
check-in (5.1 (Berkeley) 12/30/89).

This is very surprising, since in most other cases FTS is rather quite
sane about error reporting, but /any/ empty string in the input vector
blows out the creation entirely.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
---
 man3/fts.3 | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/man3/fts.3 b/man3/fts.3
index 66b2fcab3..392f8acfe 100644
--- a/man3/fts.3
+++ b/man3/fts.3
@@ -722,6 +722,14 @@ for any of the errors specified for
 and
 .BR malloc (3).
 .PP
+It will also fail and set
+.I errno
+to
+.B ENOENT
+if any element of
+.I path_argv
+is an empty string.
+.PP
 The function
 .BR fts_close ()
 may fail and set
-- 
2.30.2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-04-11 14:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-11  2:21 [PATCH] fts.3: note fts_open() behaviour with empty strings наб
2023-04-11 14:22 ` Alejandro Colomar
2023-04-11 14:36   ` наб
2023-04-11 14:56     ` Alejandro Colomar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox