DOKK / manpages / debian 10 / freebsd-manpages / getdtablesize.2freebsd.en
GETDTABLESIZE(2) System Calls Manual GETDTABLESIZE(2)

getdtablesizeget file descriptor limit

Standard C Library (libc, -lc)

#include <unistd.h>

int
getdtablesize(void);

The () system call returns the maximum number of file descriptors that the current process may open. The maximum file descriptor number that the system may assign is the return value minus one. Existing file descriptor numbers may be higher if the limit was lowered after they were opened.

close(2), closefrom(2), dup(2), getrlimit(2), sysconf(3)

The getdtablesize() system call appeared in 4.2BSD.

April 24, 2013 Debian