1FPATHCONF(3)               Linux Programmer's Manual              FPATHCONF(3)
2
3
4

NAME

6       fpathconf, pathconf - get configuration values for files
7

SYNOPSIS

9       #include <unistd.h>
10
11       long fpathconf(int fd, int name);
12       long pathconf(char *path, int name);
13

DESCRIPTION

15       fpathconf() gets a value for the configuration option name for the open
16       file descriptor fd.
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 fd or path
31              refer to a directory, then the value applies to the whole direc‐
32              tory.  The corresponding macro is _POSIX_LINK_MAX.
33
34       _PC_MAX_CANON
35              returns  the  maximum length of a formatted input line, where fd
36              or path must refer to a terminal.  The  corresponding  macro  is
37              _POSIX_MAX_CANON.
38
39       _PC_MAX_INPUT
40              returns  the  maximum  length of an input line, where fd or path
41              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 fd that the process is allowed to create.  The  corresponding
47              macro is _POSIX_NAME_MAX.
48
49       _PC_PATH_MAX
50              returns  the  maximum length of a relative pathname when path or
51              fd is the current working directory.  The corresponding macro is
52              _POSIX_PATH_MAX.
53
54       _PC_PIPE_BUF
55              returns  the  size  of the pipe buffer, where fd must refer to a
56              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 fd or path refer to a directory, then this applies  to
62              all  files  in  that  directory.   The  corresponding  macro  is
63              _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 fd or path must refer to a terminal.
73

RETURN VALUE

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

CONFORMING TO

81       POSIX.1-2001.
82

NOTES

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

SEE ALSO

91       getconf(1), open(2), statfs(2), sysconf(3)
92

COLOPHON

94       This page is part of release 3.22 of the Linux  man-pages  project.   A
95       description  of  the project, and information about reporting bugs, can
96       be found at http://www.kernel.org/doc/man-pages/.
97
98
99
100GNU                               1993-04-04                      FPATHCONF(3)
Impressum