getdtablesize(3) Library Functions Manual getdtablesize(3) getdtablesize - C (libc, -lc) #include int getdtablesize(void); glibc (. feature_test_macros(7)): getdtablesize(): glibc 2.20: _DEFAULT_SOURCE || ! (_POSIX_C_SOURCE >= 200112L) glibc 2.12 glibc 2.19: _BSD_SOURCE || ! (_POSIX_C_SOURCE >= 200112L) glibc 2.12: _BSD_SOURCE || _XOPEN_SOURCE >= 500 getdtablesize() , , , . . On Linux, getdtablesize() can return any of the errors described for getrlimit(2); see VERSIONS below. attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |getdtablesize() | | MT-Safe | +----------------------------+----------------------------------------------------------+--------------------------+ The glibc version of getdtablesize() calls getrlimit(2) and returns the current RLIMIT_NOFILE limit, or OPEN_MAX when that fails. Portable applications should employ sysconf(_SC_OPEN_MAX) instead of this call. . SVr4, 4.4BSD (first appeared in 4.2BSD). close(2), dup(2), getrlimit(2), open(2) () Azamat Hackimov , Dmitry Bolkhovskikh , Vladislav , Yuri Kozlov , Kirill Rekhov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux 6.9.1 16 2024 . getdtablesize(3)