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

Get a file variable by file descriptor
#iinncclluuddee <uunniissttdd.hh>
lloonngg ffppaatthhccoonnff(_f_d, _f_d)
iinntt _f_d, _n_a_m_e;

ffppaatthhccoonnff() returns the value of a limit or option associated with the open
file  whose  the file  descriptor  is  _f_d. _n_a_m_e  is  the 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 ffppaatthhccoonnff() returns depends  upon the type of  file that _f_d
identifies.

ffp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  _f_d identifies  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 _f_d does not identify 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 _f_d does not identify 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 _f_d
     does not identify 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 _f_d does
     not  identify  a  directory.  If  _f_d  identifies  the current  working
     directory, ffp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 _f_d identifies a pipe  or FIFO, the value returned applies to
     the FIFO  itself.  If  _f_d identifies  a directory, the  value returned
     applies  to  any  FIFOs that  exist  or  can  be  created within  that
     directory.   If _f_d  identifies  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 _f_d
     identifies 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 _f_d  does not identify 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 _f_d does not identify 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.

ffp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
either of the following is true:

-> _f_d is not a valid file descriptor.  ffppaatthhccoonnff() sets eerrrrnnoo to EEBBAADDFF.

-> _n_a_m_e is an invalid value.  ffp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
lliibbcc, ppaatthhccoonnff(), uunniissttdd.hh
POSIX Standard, section 5.7.1
