sys_resource.h(3)          POSIX Programmer's Manual         sys_resource.h(3)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.

NNAAMMEE
       sys/resource.h -- definitions for XSI resource operations

SSYYNNOOPPSSIISS
       #include <sys/resource.h>

DDEESSCCRRIIPPTTIIOONN
       The _<_s_y_s_/_r_e_s_o_u_r_c_e_._h_> header shall define the following symbolic
       constants as possible values of the _w_h_i_c_h argument of _g_e_t_p_r_i_o_r_i_t_y() and
       _s_e_t_p_r_i_o_r_i_t_y():

       PRIO_PROCESS    Identifies the _w_h_o argument as a process ID.

       PRIO_PGRP       Identifies the _w_h_o argument as a process group ID.

       PRIO_USER       Identifies the _w_h_o argument as a user ID.

       The _<_s_y_s_/_r_e_s_o_u_r_c_e_._h_> header shall define the following type through
       ttyyppeeddeeff:

       rrlliimm__tt          Unsigned integer type used for limit values.

       The _<_s_y_s_/_r_e_s_o_u_r_c_e_._h_> header shall define the following symbolic
       constants, which shall have values suitable for use in ##iiff
       preprocessing directives:

       RLIM_INFINITY   A value of rrlliimm__tt indicating no limit.

       RLIM_SAVED_MAX  A value of type rrlliimm__tt indicating an unrepresentable
                       saved hard limit.

       RLIM_SAVED_CUR  A value of type rrlliimm__tt indicating an unrepresentable
                       saved soft limit.

       On implementations where all resource limits are representable in an
       object of type rrlliimm__tt, RLIM_SAVED_MAX and RLIM_SAVED_CUR need not be
       distinct from RLIM_INFINITY.

       The _<_s_y_s_/_r_e_s_o_u_r_c_e_._h_> header shall define the following symbolic
       constants as possible values of the _w_h_o parameter of _g_e_t_r_u_s_a_g_e():

       RUSAGE_SELF     Returns information about the current process.

       RUSAGE_CHILDREN Returns information about children of the current
                       process.

       The _<_s_y_s_/_r_e_s_o_u_r_c_e_._h_> header shall define the rrlliimmiitt structure, which
       shall include at least the following members:


           rlim_t rlim_cur  The current (soft) limit.
           rlim_t rlim_max  The hard limit.

       The _<_s_y_s_/_r_e_s_o_u_r_c_e_._h_> header shall define the rruussaaggee structure, which
       shall include at least the following members:


           struct timeval ru_utime  User time used.
           struct timeval ru_stime  System time used.

       The _<_s_y_s_/_r_e_s_o_u_r_c_e_._h_> header shall define the ttiimmeevvaall structure as
       described in _<_s_y_s_/_t_i_m_e_._h_>.

       The _<_s_y_s_/_r_e_s_o_u_r_c_e_._h_> header shall define the following symbolic
       constants as possible values for the _r_e_s_o_u_r_c_e argument of _g_e_t_r_l_i_m_i_t()
       and _s_e_t_r_l_i_m_i_t():

       RLIMIT_CORE     Limit on size of ccoorree file.

       RLIMIT_CPU      Limit on CPU time per process.

       RLIMIT_DATA     Limit on data segment size.

       RLIMIT_FSIZE    Limit on file size.

       RLIMIT_NOFILE   Limit on number of open files.

       RLIMIT_STACK    Limit on stack size.

       RLIMIT_AS       Limit on address space size.

       The following shall be declared as functions and may also be defined as
       macros. Function prototypes shall be provided.


           int  getpriority(int, id_t);
           int  getrlimit(int, struct rlimit *);
           int  getrusage(int, struct rusage *);
           int  setpriority(int, id_t, int);
           int  setrlimit(int, const struct rlimit *);

       The _<_s_y_s_/_r_e_s_o_u_r_c_e_._h_> header shall define the iidd__tt type through ttyyppeeddeeff,
       as described in _<_s_y_s_/_t_y_p_e_s_._h_>.

       Inclusion of the _<_s_y_s_/_r_e_s_o_u_r_c_e_._h_> header may also make visible all
       symbols from _<_s_y_s_/_t_i_m_e_._h_>.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       None.

RRAATTIIOONNAALLEE
       None.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       <<ssyyss__ttiimmee..hh>>, <<ssyyss__ttyyppeess..hh>>

       The System Interfaces volume of POSIX.1-2017, _g_e_t_p_r_i_o_r_i_t_y(),
       _g_e_t_r_l_i_m_i_t(), _g_e_t_r_u_s_a_g_e()

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1-2017, Standard for Information Technology --
       Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the
       Institute of Electrical and Electronics Engineers, Inc and The Open
       Group.  In the event of any discrepancy between this version and the
       original IEEE and The Open Group Standard, the original IEEE and The
       Open Group Standard is the referee document. The original Standard can
       be obtained online at http://www.opengroup.org/unix/online.html .

       Any typographical or formatting errors that appear in this page are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors, see
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2017                    sys_resource.h(3)
