closedir(3) Library Functions Manual closedir(3) closedir - LIBRARY Standard C library (libc, -lc) #include #include int closedir(DIR *dirp); closedir() , dirp. closedir() , dirp. dirp . The closedir() function returns 0 on success. On error, -1 is returned, and errno is set to indicate the error. EBADF dirp. attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |closedir() | | MT-Safe | +----------------------------+----------------------------------------------------------+--------------------------+ POSIX.1-2008. POSIX.1-2001, SVr4, 4.3BSD. . close(2), opendir(3), readdir(3), rewinddir(3), scandir(3), seekdir(3), telldir(3) Azamat Hackimov , Dmitriy S. Seregin , Dmitry Bolkhovskikh , Katrin Kutepova , Yuri Kozlov ; GNU 3 , . . , , . Linux man-pages 6.06 31 2023 . closedir(3)