1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
2 .\" and Copyright (C) 2017 Michael Kerrisk <mtk.manpages@gmail.com>
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\" Modified Wed Jul 28 11:12:26 1993 by Rik Faith (faith@cs.unc.edu)
8 .\" FIXME Probably all of the following should be documented:
14 .\" _PC_REC_INCR_XFER_SIZE,
15 .\" _PC_REC_MAX_XFER_SIZE,
16 .\" _PC_REC_MIN_XFER_SIZE,
17 .\" _PC_REC_XFER_ALIGN,
18 .\" _PC_ALLOC_SIZE_MIN,
22 .TH FPATHCONF 3 2021-03-22 "Linux man-pages (unreleased)"
24 fpathconf, pathconf \- get configuration values for files
27 .RI ( libc ", " \-lc )
30 .B #include <unistd.h>
32 .BI "long fpathconf(int " fd ", int " name );
33 .BI "long pathconf(const char *" path ", int " name );
37 gets a value for the configuration option
39 for the open file descriptor
43 gets a value for configuration option
48 The corresponding macros defined in
50 are minimum values; if an application wants to take advantage of values
51 which may change, a call to
55 can be made, which may yield more liberal results.
59 equal to one of the following constants returns the following
60 configuration options:
63 The maximum number of links to the file.
68 refer to a directory, then the value applies to the whole directory.
69 The corresponding macro is
73 The maximum length of a formatted input line, where
77 must refer to a terminal.
78 The corresponding macro is
79 .BR _POSIX_MAX_CANON .
82 The maximum length of an input line, where
86 must refer to a terminal.
87 The corresponding macro is
88 .BR _POSIX_MAX_INPUT .
91 The maximum length of a filename in the directory
95 that the process is allowed to create.
96 The corresponding macro is
100 The maximum length of a relative pathname when
104 is the current working directory.
105 The corresponding macro is
106 .BR _POSIX_PATH_MAX .
109 The maximum number of bytes that can be written atomically to a pipe of FIFO.
113 should refer to a pipe or FIFO.
117 should refer to a FIFO or a directory; in the latter case,
118 the returned value corresponds to FIFOs created in that directory.
119 The corresponding macro is
120 .BR _POSIX_PIPE_BUF .
122 .B _PC_CHOWN_RESTRICTED
123 This returns a positive value if the use of
127 for changing a file's user ID is restricted to a process
128 with appropriate privileges,
129 and changing a file's group ID to a value other than the process's
130 effective group ID or one of its supplementary group IDs
131 is restricted to a process with appropriate privileges.
132 According to POSIX.1,
133 this variable shall always be defined with a value other than \-1.
134 The corresponding macro is
135 .BR _POSIX_CHOWN_RESTRICTED .
141 refers to a directory,
142 then the return value applies to all files in that directory.
145 This returns nonzero if accessing filenames longer than
148 The corresponding macro is
149 .BR _POSIX_NO_TRUNC .
152 This returns nonzero if special character processing can be disabled, where
156 must refer to a terminal.
158 The return value of these functions is one of the following:
160 On error, \-1 is returned and
162 is set to indicate the error
171 corresponds to a maximum or minimum limit, and that limit is indeterminate,
175 (To distinguish an indeterminate limit from an error, set
177 to zero before the call, and then check whether
179 is nonzero when \-1 is returned.)
183 corresponds to an option,
184 a positive value is returned if the option is supported,
185 and \-1 is returned if the option is not supported.
188 the current value of the option or limit is returned.
189 This value will not be more restrictive than
190 the corresponding value that was described to the application in
194 when the application was compiled.
199 Search permission is denied for one of the directories in the path prefix of
205 is not a valid file descriptor.
212 The implementation does not support an association of
214 with the specified file.
218 Too many symbolic links were encountered while resolving
236 A component used as a directory in
238 is not in fact a directory.
240 For an explanation of the terms used in this section, see
248 Interface Attribute Value
252 T} Thread safety MT-Safe
258 POSIX.1-2001, POSIX.1-2008.
260 Files with name lengths longer than the value returned for
264 may exist in the given directory.
266 Some returned values may be huge; they are not suitable for allocating