From: Collin Funk Date: Fri, 17 Oct 2025 08:18:43 +0000 (-0700) Subject: man/man3/opendir.3: ERRORS: Document that long file names result in ENAMETOOLONG X-Git-Tag: man-pages-6.16~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa5b244e3fa1cd0e401718de2e30a37f03ec5ef8;p=thirdparty%2Fman-pages.git man/man3/opendir.3: ERRORS: Document that long file names result in ENAMETOOLONG This behavior can be seen with the following example program: $ cat main.c #include #include #include #include #include int main(int argc, char *argv[argc+1]) { DIR *d; if (argc < 2) errx(EXIT_FAILURE, "argc < 2"); d = opendir(argv[1]); if (d == NULL) err(EXIT_FAILURE, "opendir"); closedir(d); exit(EXIT_SUCCESS); } $ cc -Wall -Wextra main.c $ ./a.out $(printf '%0999d') a.out: opendir: File name too long Signed-off-by: Collin Funk Message-ID: <4266061219d7406c0aa737f8d52108fea7e0f7fb.1760689006.git.collin.funk1@gmail.com> [jwilk: simpler reproducer] Cc: Jakub Wilk [alx: Fix style in the reproducer program] Signed-off-by: Alejandro Colomar --- diff --git a/man/man3/opendir.3 b/man/man3/opendir.3 index a9af16269..6a5c7880f 100644 --- a/man/man3/opendir.3 +++ b/man/man3/opendir.3 @@ -73,6 +73,10 @@ is not a valid file descriptor opened for reading. .B EMFILE The per-process limit on the number of open file descriptors has been reached. .TP +.B ENAMETOOLONG +.I name +was too long. +.TP .B ENFILE The system-wide limit on the total number of open files has been reached. .TP