Standards / Extensions | C or C++ | Dependencies |
---|---|---|
XPG4.2 | both |
#define _XOPEN_SOURCE_EXTENDED 1
#include <unistd.h>
int getdtablesize(void);
The getdtablesize() function is equivalent to getrlimit() with the RLIMIT_NOFILE option.
This function is kept for historical reasons. It was part of the Legacy Feature in Single UNIX Specification, Version 2, but has been withdrawn and is not supported as part of Single UNIX Specification, Version 3. New applications should use getrlimit() instead of getdtablesize().
If it is necessary to continue using this function in an application written for Single UNIX Specification, Version 3, define the feature test macro _UNIX03_WITHDRAWN before including any standard system headers. The macro exposes all interfaces and symbols removed in Single UNIX Specification, Version 3.
getdtablesize() returns the current soft limit as if obtained from a call to getrlimit().
There are no errno values defined.