ppaatthhccoonnff() -- System Call (libc)

Get a file variable by path name
#iinncclluuddee <uunniissttdd.hh>
lloonngg ppaatthhccoonnff(_p_a_t_h, _n_a_m_e)
ccoonnsstt cchhaarr *_p_a_t_h; iinntt _n_a_m_e;

ppaatthhccoonnff() returns the value of a  limit or option associated with the file
_p_a_t_h. _n_a_m_e  is a symbolic constant (defined  in <uunniissttdd.hh>) that represents
the  limit or  option to  be returned.  The  value that  ppaatthhccoonnff() returns
depends upon the type of file that _p_a_t_h names.

ppaatthhccoonnff() can return information about the following constants:

_PPCC_LLIINNKK_MMAAXX
     The maximum value of a file's  link count.  If _p_a_t_h names a directory,
     the value returned applies to the directory itself.

_PPCC_MMAAXX_CCAANNOONN
     The number  of bytes in a terminal's  canonical input queue.  Behavior
     is undefined if _p_a_t_h does not name a terminal file.

_PPCC_MMAAXX_IINNPPUUTT
     The number of bytes for which  space will be available in a terminal's
     input queue.   Behavior is undefined if _p_a_t_h does  not name a terminal
     file.

_PPCC_NNAAMMEE_MMAAXX
     The number of  bytes in a file name.  The  behavior is refined if _p_a_t_h
     does not  name a  directory.  The value  returned applies to  the file
     names within the directory.

_PPCC_PPAATTHH_MMAAXX
     The number  of bytes in  a path name.   Behavior is undefined  if _p_a_t_h
     does  not refer  to a  directory.  If _p_a_t_h  names the  current working
     directory, ppaatthhccoonnff()  returns the maximum  length of a  relative path
     name.

_PPCC_PPIIPPEE_BBUUFF
     The number of  bytes that can be written atomically  when writing to a
     pipe.  If _p_a_t_h names a pipe or FIFO, the value returned applies to the
     FIFO itself.  If _p_a_t_h names a directory, the value returned applies to
     any FIFOs that exist or can be created within that directory.  If _p_a_t_h
     names any other type of file, behavior is undefined.

_PPCC_CCHHOOWWNN_RREESSTTRRIICCTTEEDD
     cchhoowwnn() can be used only by a process with appropriate privileges, and
     only  to change  the  group ID  of  a file  to  either that  process's
     effective group  ID or  one of its  supplementary group IDs.   If _p_a_t_h
     names a directory, the value  returned applies to any file, other than
     a directory, that exists or can be created within the directory.

_PPCC_NNOO_TTRRUUNNCC
     Path-name  components longer  than  NNAAMMEE_MMAAXX generate  an error.   The
     behavior is undefined if _p_a_t_h does not refer to a directory.  The value
     returned applies to the file names within the directory.

_PPCC_VVDDIISSAABBLLEE
     If this value is defined, terminal-special characters can be disabled.
     Behavior is undefined if _p_a_t_h does not name a terminal file.

The value of the system limit or option that _n_a_m_e specifies does not change
during the lifetime of the calling process.

ppaatthhccoonnff()  fails  and returns  -1  if  _n_a_m_e is  not  set  to a  recognized
constant.  It fails, returns -1, and  sets eerrrrnnoo to an appropriate value if
any of the following is true:

-> The process that calls ppaatthhccoonnff() lacks permission to search a directory
   named in _p_a_t_h. ppaatthhccoonnff() sets eerrrrnnoo to EEAACCCCEESS.

-> _p_a_t_h is  needed for  the command  specified and it  either points  to an
   empty string or names a file that does not exist.  ppaatthhccoonnff() sets eerrrrnnoo
   to EENNOOEENNTT.

-> A component of _p_a_t_h's prefix  is not a directory.  ppaatthhccoonnff() sets eerrrrnnoo
   to EENNOOTTDDIIRR.

-> _n_a_m_e is an invalid value.  ppaatthhccoonnff() sets eerrrrnnoo to EEIINNVVAALL.

_S_e_e _A_l_s_o
ffppaatthhccoonnff(), lliibbcc
POSIX Standard, section 5.7.1
