1 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date. The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein. The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" Modified 2002-04-15 by Roger Luethi <rl@hellgate.ch> and aeb
27 .TH GETDTABLESIZE 3 2021-03-22 "Linux" "Linux Programmer's Manual"
29 getdtablesize \- get file descriptor table size
32 .B #include <unistd.h>
34 .B int getdtablesize(void);
38 Feature Test Macro Requirements for glibc (see
39 .BR feature_test_macros (7)):
45 _DEFAULT_SOURCE || ! (_POSIX_C_SOURCE >= 200112L)
47 _BSD_SOURCE || ! (_POSIX_C_SOURCE >= 200112L)
49 _BSD_SOURCE || _XOPEN_SOURCE >= 500
50 .\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
54 returns the maximum number of files a process can have open,
55 one more than the largest possible value for a file descriptor.
57 The current limit on the number of open files per process.
61 can return any of the errors described for
65 For an explanation of the terms used in this section, see
73 Interface Attribute Value
76 T} Thread safety MT-Safe
84 function first appeared in 4.2BSD).
85 It is not specified in POSIX.1;
86 portable applications should employ
87 .I sysconf(_SC_OPEN_MAX)
94 and returns the current
99 .\" The libc4 and libc5 versions return
101 .\" (set to 256 since Linux 0.98.4).