Return the value of a configurable limit associated with a file
long fpathconf( int filedes,
int name );
- A file descriptor for the file whose limit you want to check.
- The name of the configurable limit; see below.
Use the -l c option to
to link against this library.
This library is usually included automatically.
The fpathconf() function returns a value of a configurable limit
indicated by name that's associated with the file
indicated by filedes.
Configurable limits are defined in <confname.h>, and include
at least the following values:
- Defined (not -1) if asynchronous I/O is supported for the file.
- If defined (not -1), indicates that the use of the chown()
function is restricted to a process with appropriate privileges, and to
changing the group ID of a file to the effective group ID of the
process or to one of its supplementary group IDs.
- Defined (not -1) if the filesystem permits the unlinking of
- Maximum value of a file's link count.
- Maximum number of bytes in a terminal's canonical input buffer
- Maximum number of bytes in a terminal's raw input buffer.
- Maximum number of bytes in a file name (not including the terminating
- If defined (not -1), indicates that the use of pathname components
longer than the value given by _PC_NAME_MAX
generates an error.
- Maximum number of bytes in a pathname (not including the terminating
- Maximum number of bytes that can be written atomically when writing to
- Defined (not -1) if prioritized I/O is supported for the file.
- Defined (not -1) if synchronous I/O is supported for the file.
- If defined (not -1), this is the character value that can be used to
individually disable special control characters in the
The requested configurable limit, or -1 if an error occurred
(errno is set).
- The name argument is invalid, or the indicated limit isn't
supported for this filedes.
- The argument filedes is invalid.
value = fpathconf( 0, _PC_MAX_INPUT );
printf( "Input buffer size is %ld bytes\n",