2 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
3 .\" and Copyright (C) 2017 Michael Kerrisk <mtk.manpages@gmail.com>
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
7 .\" Modified Wed Jul 28 11:12:26 1993 by Rik Faith (faith@cs.unc.edu)
9 .\" FIXME Probably all of the following should be documented:
15 .\" _PC_REC_INCR_XFER_SIZE,
16 .\" _PC_REC_MAX_XFER_SIZE,
17 .\" _PC_REC_MIN_XFER_SIZE,
18 .\" _PC_REC_XFER_ALIGN,
19 .\" _PC_ALLOC_SIZE_MIN,
23 .TH fpathconf 3 (date) "Linux man-pages (unreleased)"
25 fpathconf, pathconf \- get configuration values for files
28 .RI ( libc ", " \-lc )
31 .B #include <unistd.h>
33 .BI "long fpathconf(int " fd ", int " name );
34 .BI "long pathconf(const char *" path ", int " name );
38 gets a value for the configuration option
40 for the open file descriptor
44 gets a value for configuration option
49 The corresponding macros defined in
51 are minimum values; if an application wants to take advantage of values
52 which may change, a call to
56 can be made, which may yield more liberal results.
60 equal to one of the following constants returns the following
61 configuration options:
64 The maximum number of links to the file.
69 refer to a directory, then the value applies to the whole directory.
70 The corresponding macro is
74 The maximum length of a formatted input line, where
78 must refer to a terminal.
79 The corresponding macro is
80 .BR _POSIX_MAX_CANON .
83 The maximum length of an input line, where
87 must refer to a terminal.
88 The corresponding macro is
89 .BR _POSIX_MAX_INPUT .
92 The maximum length of a filename in the directory
96 that the process is allowed to create.
97 The corresponding macro is
101 The maximum length of a relative pathname when
105 is the current working directory.
106 The corresponding macro is
107 .BR _POSIX_PATH_MAX .
110 The maximum number of bytes that can be written atomically to a pipe of FIFO.
114 should refer to a pipe or FIFO.
118 should refer to a FIFO or a directory; in the latter case,
119 the returned value corresponds to FIFOs created in that directory.
120 The corresponding macro is
121 .BR _POSIX_PIPE_BUF .
123 .B _PC_CHOWN_RESTRICTED
124 This returns a positive value if the use of
128 for changing a file's user ID is restricted to a process
129 with appropriate privileges,
130 and changing a file's group ID to a value other than the process's
131 effective group ID or one of its supplementary group IDs
132 is restricted to a process with appropriate privileges.
133 According to POSIX.1,
134 this variable shall always be defined with a value other than \-1.
135 The corresponding macro is
136 .BR _POSIX_CHOWN_RESTRICTED .
142 refers to a directory,
143 then the return value applies to all files in that directory.
146 This returns nonzero if accessing filenames longer than
149 The corresponding macro is
150 .BR _POSIX_NO_TRUNC .
153 This returns nonzero if special character processing can be disabled, where
157 must refer to a terminal.
159 The return value of these functions is one of the following:
161 On error, \-1 is returned and
163 is set to indicate the error
172 corresponds to a maximum or minimum limit, and that limit is indeterminate,
176 (To distinguish an indeterminate limit from an error, set
178 to zero before the call, and then check whether
180 is nonzero when \-1 is returned.)
184 corresponds to an option,
185 a positive value is returned if the option is supported,
186 and \-1 is returned if the option is not supported.
189 the current value of the option or limit is returned.
190 This value will not be more restrictive than
191 the corresponding value that was described to the application in
195 when the application was compiled.
200 Search permission is denied for one of the directories in the path prefix of
206 is not a valid file descriptor.
213 The implementation does not support an association of
215 with the specified file.
219 Too many symbolic links were encountered while resolving
237 A component used as a directory in
239 is not in fact a directory.
241 For an explanation of the terms used in this section, see
249 Interface Attribute Value
253 T} Thread safety MT-Safe
259 POSIX.1-2001, POSIX.1-2008.
261 Files with name lengths longer than the value returned for
265 may exist in the given directory.
267 Some returned values may be huge; they are not suitable for allocating