pathconf(2) DG/UX 5.4R3.00 pathconf(2)
NAME
pathconf, fpathconf - get configurable pathname values
SYNOPSIS
#include <unistd.h>
long pathconf (path, name)
char *path;
int name;
long fpathconf (fildes, name)
int fildes, name;
DESCRIPTION
Use pathconf(2) or fpathconf(2) to get the current value of a system
option, specified by name, associated with a directory or file. The
valid arguments you can enter for name are listed and described
below:
_PC_CHOWN_RESTRICTED Find out (-1 means no) whether access to the
directory or file is restricted. If so, use of
chown and fchown are restricted as follows:
(1) Only a process with appropriate privileges
can change the user ID of the file or directory.
(2) A process whose effective user ID matches
the user ID of the directory or file may change
the group ID, but only to the process's
effective group ID, or to one of the process's
supplementary IDs.
_PC_LINK_MAX Get the maximum number of links allowed to path
or fildes.
_PC_MAX_CANON Get the maximum length of a formatted input
line; path or fildes must refer to a terminal.
_PC_MAX_INPUT Get the maximum length of an input line; path or
fildes must refer to a terminal.
_PC_NO_TRUNC Find out (-1 means no) whether no-truncation is
set for path or fildes. If so, an attempt to
create a file in the named directory will fail
with error ENAMETOOLONG if the filename would be
truncated.
_PC_NAME_MAX Get the maximum length of a filename for
directory path or fildes.
_PC_PATH_MAX Get the maximum length of a relative pathname
when path or fildes is the working directory.
The returned value represents the number of
characters that may be appended to path or
Licensed material--property of copyright holder(s) 1
pathconf(2) DG/UX 5.4R3.00 pathconf(2)
fildes.
_PC_PIPE_BUF Get the size of the pipe buffer; path or fildes
must be a FIFO.
_PC_VDISABLE Find out (-1 means no) whether special character
processing can be disabled; path or fildes must
refer to a terminal.
DIAGNOSTICS
Return Value
If name is invalid, pathconf(2) or fpathconf returns -1 and sets
errno. If name is valid but the associated function is not
applicable on the system, the calls return -1 without setting errno.
Otherwise, the calls return the current value of the system parameter
indicated by name.
Errors
EINVAL The value of the name argument is invalid.
EINVAL The implementation does not support an association of the
variable name with the specified file.
EACCES Search permission is denied for a component of the path
prefix.
ENAMETOOLONG
The length of the path argument exceeds {PATH_MAX}, or a
pathname component is longer than {NAME_MAX} while
{_POSIX_NO_TRUNC} is in effect.
ENOENT The named file does not exist or the path argument points
to an empty string.
ENOTDIR A component of the path prefix is not a directory.
EBADF The fildes argument is not a valid file descriptor.
SEE ALSO
sysconf(2).
Licensed material--property of copyright holder(s) 2