1FPATHCONF(3) Linux Programmer's Manual FPATHCONF(3)
2
3
4
6 fpathconf, pathconf - get configuration values for files
7
9 #include <unistd.h>
10
11 long fpathconf(int filedes, int name);
12 long pathconf(char *path, int name);
13
15 fpathconf() gets a value for the configuration option name for the open
16 file descriptor filedes.
17
18 pathconf() gets a value for configuration option name for the filename
19 path.
20
21 The corresponding macros defined in <unistd.h> are minimum values; if
22 an application wants to take advantage of values which may change, a
23 call to fpathconf() or pathconf() can be made, which may yield more
24 liberal results.
25
26 Setting name equal to one of the following constants returns the fol‐
27 lowing configuration options:
28
29 _PC_LINK_MAX
30 returns the maximum number of links to the file. If filedes or
31 path refer to a directory, then the value applies to the whole
32 directory. The corresponding macro is _POSIX_LINK_MAX.
33
34 _PC_MAX_CANON
35 returns the maximum length of a formatted input line, where
36 filedes or path must refer to a terminal. The corresponding
37 macro is _POSIX_MAX_CANON.
38
39 _PC_MAX_INPUT
40 returns the maximum length of an input line, where filedes or
41 path must refer to a terminal. The corresponding macro is
42 _POSIX_MAX_INPUT.
43
44 _PC_NAME_MAX
45 returns the maximum length of a filename in the directory path
46 or filedes. the process is allowed to create. The correspond‐
47 ing macro is _POSIX_NAME_MAX.
48
49 _PC_PATH_MAX
50 returns the maximum length of a relative pathname when path or
51 filedes is the current working directory. The corresponding
52 macro is _POSIX_PATH_MAX.
53
54 _PC_PIPE_BUF
55 returns the size of the pipe buffer, where filedes must refer to
56 a pipe or FIFO and path must refer to a FIFO. The corresponding
57 macro is _POSIX_PIPE_BUF.
58
59 _PC_CHOWN_RESTRICTED
60 returns non-zero if the chown(2) call may not be used on this
61 file. If filedes or path refer to a directory, then this
62 applies to all files in that directory. The corresponding macro
63 is _POSIX_CHOWN_RESTRICTED.
64
65 _PC_NO_TRUNC
66 returns non-zero if accessing filenames longer than
67 _POSIX_NAME_MAX generates an error. The corresponding macro is
68 _POSIX_NO_TRUNC.
69
70 _PC_VDISABLE
71 returns non-zero if special character processing can be dis‐
72 abled, where filedes or path must refer to a terminal.
73
75 The limit is returned, if one exists. If the system does not have a
76 limit for the requested resource, -1 is returned, and errno is
77 unchanged. If there is an error, -1 is returned, and errno is set to
78 reflect the nature of the error.
79
81 POSIX.1-2001.
82
84 Files with name lengths longer than the value returned for name equal
85 to _PC_NAME_MAX may exist in the given directory.
86
87 Some returned values may be huge; they are not suitable for allocating
88 memory.
89
91 getconf(1), open(2), statfs(2), sysconf(3)
92
93
94
95GNU 1993-04-04 FPATHCONF(3)