OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / original / man3 / fpathconf.3
1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\" License.
23 .\" Modified Wed Jul 28 11:12:26 1993 by Rik Faith (faith@cs.unc.edu)
24 .TH FPATHCONF 3  1993-04-04 "GNU" "Linux Programmer's Manual"
25 .SH NAME
26 fpathconf, pathconf \- get configuration values for files
27 .SH SYNOPSIS
28 .nf
29 .B #include <unistd.h>
30 .sp
31 .BI "long fpathconf(int " fd ", int " name );
32 .br
33 .BI "long pathconf(char *" path ", int " name );
34 .fi
35 .SH DESCRIPTION
36 .BR fpathconf ()
37 gets a value for the configuration option
38 .I name
39 for the open file descriptor
40 .IR fd .
41 .PP
42 .BR pathconf ()
43 gets a value for configuration option
44 .I name
45 for the filename
46 .IR path .
47 .PP
48 The corresponding macros defined in
49 .I <unistd.h>
50 are minimum values; if an application wants to take advantage of values
51 which may change, a call to
52 .BR fpathconf ()
53 or
54 .BR pathconf ()
55 can be made, which may yield more liberal results.
56 .PP
57 Setting
58 .I name
59 equal to one of the following constants returns the following
60 configuration options:
61 .TP
62 .B _PC_LINK_MAX
63 returns the maximum number of links to the file.
64 If
65 .I fd
66 or
67 .I path
68 refer to a directory, then the value applies to the whole directory.
69 The corresponding macro is
70 .BR _POSIX_LINK_MAX .
71 .TP
72 .B _PC_MAX_CANON
73 returns the maximum length of a formatted input line, where
74 .I fd
75 or
76 .I path
77 must refer to a terminal.
78 The corresponding macro is
79 .BR _POSIX_MAX_CANON .
80 .TP
81 .B _PC_MAX_INPUT
82 returns the maximum length of an input line, where
83 .I fd
84 or
85 .I path
86 must refer to a terminal.
87 The corresponding macro is
88 .BR _POSIX_MAX_INPUT .
89 .TP
90 .B _PC_NAME_MAX
91 returns the maximum length of a filename in the directory
92 .I path
93 or
94 .IR fd
95 that the process is allowed to create.
96 The corresponding macro is
97 .BR _POSIX_NAME_MAX .
98 .TP
99 .B _PC_PATH_MAX
100 returns the maximum length of a relative pathname when
101 .I path
102 or
103 .I fd
104 is the current working directory.
105 The corresponding macro is
106 .BR _POSIX_PATH_MAX .
107 .TP
108 .B _PC_PIPE_BUF
109 returns the size of the pipe buffer, where
110 .I fd
111 must refer to a pipe or FIFO and
112 .I path
113 must refer to a FIFO.
114 The corresponding macro is
115 .BR _POSIX_PIPE_BUF .
116 .TP
117 .B _PC_CHOWN_RESTRICTED
118 returns nonzero if the
119 .BR chown (2)
120 call may not be used on this file.
121 If
122 .I fd
123 or
124 .I path
125 refer to a directory, then this applies to all files in that
126 directory.
127 The corresponding macro is
128 .BR _POSIX_CHOWN_RESTRICTED .
129 .TP
130 .B _PC_NO_TRUNC
131 returns nonzero if accessing filenames longer than
132 .B _POSIX_NAME_MAX
133 generates an error.
134 The corresponding macro is
135 .BR _POSIX_NO_TRUNC .
136 .TP
137 .B _PC_VDISABLE
138 returns nonzero if special character processing can be disabled, where
139 .I fd
140 or
141 .I path
142 must refer to a terminal.
143 .SH "RETURN VALUE"
144 The limit is returned, if one exists.
145 If the system does not have a
146 limit for the requested resource, \-1 is returned, and
147 .I errno
148 is unchanged.
149 If there is an error, \-1 is returned, and
150 .I errno
151 is set to reflect the nature of the error.
152 .SH "CONFORMING TO"
153 POSIX.1-2001.
154 .SH NOTES
155 Files with name lengths longer than the value returned for
156 .I name
157 equal to
158 .B _PC_NAME_MAX
159 may exist in the given directory.
160 .PP
161 Some returned values may be huge; they are not suitable for allocating
162 memory.
163 .SH "SEE ALSO"
164 .BR getconf (1),
165 .BR open (2),
166 .BR statfs (2),
167 .BR sysconf (3)