1GETDTABLESIZE(2)           Linux Programmer's Manual          GETDTABLESIZE(2)
2
3
4

NAME

6       getdtablesize - get descriptor table size
7

SYNOPSIS

9       #include <unistd.h>
10
11       int getdtablesize(void);
12
13   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
14
15       getdtablesize(): _BSD_SOURCE || _XOPEN_SOURCE >= 500
16

DESCRIPTION

18       getdtablesize()  returns the maximum number of files a process can have
19       open, one more than the largest possible value for a file descriptor.
20

RETURN VALUE

22       The current limit on the number of open files per process.
23

ERRORS

25       On Linux, getdtablesize() can return any of the  errors  described  for
26       getrlimit(2); see NOTES below.
27

CONFORMING TO

29       SVr4,  4.4BSD  (the getdtablesize() function first appeared in 4.2BSD).
30       It is not  specified  in  POSIX.1-2001;  portable  applications  should
31       employ sysconf(_SC_OPEN_MAX) instead of this call.
32

NOTES

34       getdtablesize()  is  implemented as a libc library function.  The glibc
35       version calls getrlimit(2) and returns the current RLIMIT_NOFILE limit,
36       or  OPEN_MAX  when  that  fails.   The  libc4 and libc5 versions return
37       OPEN_MAX (set to 256 since Linux 0.98.4).
38

SEE ALSO

40       close(2), dup(2), getrlimit(2), open(2)
41

COLOPHON

43       This page is part of release 3.22 of the Linux  man-pages  project.   A
44       description  of  the project, and information about reporting bugs, can
45       be found at http://www.kernel.org/doc/man-pages/.
46
47
48
49Linux                             2007-07-26                  GETDTABLESIZE(2)
Impressum