OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / 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 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
28 .\"         all rights reserved.
29 .\" Translated Sat Feb 22 20:20:24 JST 1997
30 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
31 .\" Updated 2002-10-14 by Kentaro Shirakata <argrath@ub32.org>
32 .\" Updated 2007-01-01 by Kentaro Shirakata <argrath@ub32.org>
33 .\"
34 .TH GETDTABLESIZE 2 2010-09-20 "Linux" "Linux Programmer's Manual"
35 .\"O .SH NAME
36 .SH 名前
37 .\"O getdtablesize \- get descriptor table size
38 getdtablesize \- ディスクリプタ・テーブルのサイズを取得する
39 .\"O .SH SYNOPSIS
40 .SH 書式
41 .B #include <unistd.h>
42 .sp
43 .B int getdtablesize(void);
44 .sp
45 .in -4n
46 .\"O Feature Test Macro Requirements for glibc (see
47 .\"O .BR feature_test_macros (7)):
48 glibc 向けの機能検査マクロの要件
49 .RB ( feature_test_macros (7)
50 参照):
51 .in
52 .sp
53 .BR getdtablesize ():
54 .ad l
55 .RS 4
56 .PD 0
57 .TP 4
58 .\"O Since glibc 2.12:
59 glibc 2.12 以降:
60 .nf
61 _BSD_SOURCE ||
62     !(_POSIX_C_SOURCE\ >=\ 200112L || _XOPEN_SOURCE\ >=\ 600)
63 .fi
64 .TP 4
65 .\"O Before glibc 2.12:
66 glibc 2.12 より前:
67 _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
68 _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
69 .PD
70 .RE
71 .ad b
72 .\"O .SH DESCRIPTION
73 .SH 説明
74 .\"O .BR getdtablesize ()
75 .\"O returns the maximum number of files a process can have open,
76 .\"O one more than the largest possible value for a file descriptor.
77 .BR getdtablesize ()
78 は 1 つのプロセスのオープンできるファイル数の最大値を返す。
79 返り値はファイルディスクリプタの取り得る最大値より 1 大きい値である。
80 .\"O .SH "RETURN VALUE"
81 .SH 返り値
82 .\"O The current limit on the number of open files per process.
83 プロセス毎にオープンできるファイル数の現在の制限値。
84 .\"O .SH ERRORS
85 .SH エラー
86 .\"O On Linux,
87 .\"O .BR getdtablesize ()
88 .\"O can return any of the errors described for
89 .\"O .BR getrlimit (2);
90 .\"O see NOTES below.
91 Linux では、
92 .BR getdtablesize ()
93
94 .BR getrlimit (2)
95 で説明されているエラーを返すことがある。
96 下記の「注意」を参照のこと。
97 .\"O .SH "CONFORMING TO"
98 .SH 準拠
99 .\"O SVr4, 4.4BSD (the
100 .\"O .BR getdtablesize ()
101 .\"O function first appeared in 4.2BSD).
102 SVr4, 4.4BSD
103 .RB ( getdtablesize ()
104 関数は 4.2BSD で最初に現われた)。
105 .\"O It is not specified in POSIX.1-2001;
106 .\"O portable applications should employ
107 .\"O .I sysconf(_SC_OPEN_MAX)
108 .\"O instead of this call.
109 これは POSIX.1-2001 で規定されていないので、
110 移植性のあるアプリケーションはこの呼び出しの代わりに
111 .I sysconf(_SC_OPEN_MAX)
112 を使うべきである。
113 .\"O .SH NOTES
114 .SH 注意
115 .\"O .BR getdtablesize ()
116 .\"O is implemented as a libc library function.
117 .\"O The glibc version calls
118 .\"O .BR getrlimit (2)
119 .\"O and returns the current
120 .\"O .B RLIMIT_NOFILE
121 .\"O limit, or
122 .\"O .B OPEN_MAX
123 .\"O when that fails.
124 .BR getdtablesize ()
125 は libc のライブラリ関数として実装されている。glibc 版は
126 .BR getrlimit (2)
127 を呼び出して、現在の
128 .B RLIMIT_NOFILE
129 を返す。
130 呼び出しに失敗した場合は
131 .B OPEN_MAX
132 を返す。
133 .\"O The libc4 and libc5 versions return
134 .\"O .B OPEN_MAX
135 .\"O (set to 256 since Linux 0.98.4).
136 libc4 と libc5 では
137 .B OPEN_MAX
138 (Linux 0.98.4 以降では 256 に設定されている)
139 を返す。
140 .\"O .SH "SEE ALSO"
141 .SH 関連項目
142 .BR close (2),
143 .BR dup (2),
144 .BR getrlimit (2),
145 .BR open (2)