]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man2/getdtablesize.2
Automated addition of parentheses by add_parens_for_own_funcs.sh
[thirdparty/man-pages.git] / man2 / getdtablesize.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" Modified 2002-04-15 by Roger Luethi <rl@hellgate.ch> and aeb
26 .\"
27 .TH GETDTABLESIZE 2 2002-04-15 "Linux 2.4" "Linux Programmer's Manual"
28 .SH NAME
29 getdtablesize \- get descriptor table size
30 .SH SYNOPSIS
31 .B #include <unistd.h>
32 .sp
33 .B int getdtablesize(void);
34 .SH DESCRIPTION
35 .BR getdtablesize ()
36 returns the maximum number of files a process can have open,
37 one more than the largest possible value for a file descriptor.
38 .SH "RETURN VALUE"
39 The current limit on the number of open files per process.
40 .SH NOTES
41 .BR getdtablesize ()
42 is implemented as a libc library function. The glibc version calls
43 .BR getrlimit (2)
44 and returns the current
45 .B RLIMIT_NOFILE
46 limit, or
47 .B OPEN_MAX
48 when that fails.
49 The libc4 and libc5 versions return
50 .B OPEN_MAX
51 (set to 256 since Linux 0.98.4).
52 .SH "CONFORMING TO"
53 SVr4, 4.4BSD (the
54 .BR getdtablesize ()
55 function first appeared in 4.2BSD).
56 .SH "SEE ALSO"
57 .BR close (2),
58 .BR dup (2),
59 .BR getrlimit (2),
60 .BR open (2)