1sys_resource.h(0P)         POSIX Programmer's Manual        sys_resource.h(0P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       sys/resource.h — definitions for XSI resource operations
14

SYNOPSIS

16       #include <sys/resource.h>
17

DESCRIPTION

19       The <sys/resource.h> header shall define the  following  symbolic  con‐
20       stants  as  possible  values of the which argument of getpriority() and
21       setpriority():
22
23       PRIO_PROCESS    Identifies the who argument as a process ID.
24
25       PRIO_PGRP       Identifies the who argument as a process group ID.
26
27       PRIO_USER       Identifies the who argument as a user ID.
28
29       The <sys/resource.h> header shall define  the  following  type  through
30       typedef:
31
32       rlim_t          Unsigned integer type used for limit values.
33
34       The  <sys/resource.h>  header  shall define the following symbolic con‐
35       stants, which shall have values suitable for use in  #if  preprocessing
36       directives:
37
38       RLIM_INFINITY   A value of rlim_t indicating no limit.
39
40       RLIM_SAVED_MAX  A  value  of  type rlim_t indicating an unrepresentable
41                       saved hard limit.
42
43       RLIM_SAVED_CUR  A value of type rlim_t  indicating  an  unrepresentable
44                       saved soft limit.
45
46       On  implementations  where  all resource limits are representable in an
47       object of type rlim_t, RLIM_SAVED_MAX and RLIM_SAVED_CUR  need  not  be
48       distinct from RLIM_INFINITY.
49
50       The  <sys/resource.h>  header  shall define the following symbolic con‐
51       stants as possible values of the who parameter of getrusage():
52
53       RUSAGE_SELF     Returns information about the current process.
54
55       RUSAGE_CHILDREN Returns  information  about  children  of  the  current
56                       process.
57
58       The  <sys/resource.h>  header  shall define the rlimit structure, which
59       shall include at least the following members:
60
61           rlim_t rlim_cur  The current (soft) limit.
62           rlim_t rlim_max  The hard limit.
63
64       The <sys/resource.h> header shall define the  rusage  structure,  which
65       shall include at least the following members:
66
67           struct timeval ru_utime  User time used.
68           struct timeval ru_stime  System time used.
69
70       The  <sys/resource.h>  header  shall  define  the  timeval structure as
71       described in <sys/time.h>.
72
73       The <sys/resource.h> header shall define the  following  symbolic  con‐
74       stants  as possible values for the resource argument of getrlimit() and
75       setrlimit():
76
77       RLIMIT_CORE     Limit on size of core file.
78
79       RLIMIT_CPU      Limit on CPU time per process.
80
81       RLIMIT_DATA     Limit on data segment size.
82
83       RLIMIT_FSIZE    Limit on file size.
84
85       RLIMIT_NOFILE   Limit on number of open files.
86
87       RLIMIT_STACK    Limit on stack size.
88
89       RLIMIT_AS       Limit on address space size.
90
91       The following shall be declared as functions and may also be defined as
92       macros. Function prototypes shall be provided.
93
94           int  getpriority(int, id_t);
95           int  getrlimit(int, struct rlimit *);
96           int  getrusage(int, struct rusage *);
97           int  setpriority(int, id_t, int);
98           int  setrlimit(int, const struct rlimit *);
99
100       The <sys/resource.h> header shall define the id_t type through typedef,
101       as described in <sys/types.h>.
102
103       Inclusion of the <sys/resource.h> header may also make visible all sym‐
104       bols from <sys/time.h>.
105
106       The following sections are informative.
107

APPLICATION USAGE

109       None.
110

RATIONALE

112       None.
113

FUTURE DIRECTIONS

115       None.
116

SEE ALSO

118       <sys_time.h>, <sys_types.h>
119
120       The  System  Interfaces  volume  of  POSIX.1‐2008, getpriority(), getr‐
121       limit(), getrusage()
122
124       Portions of this text are reprinted and reproduced in  electronic  form
125       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
126       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
127       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
128       cal and Electronics Engineers,  Inc  and  The  Open  Group.   (This  is
129       POSIX.1-2008  with  the  2013  Technical Corrigendum 1 applied.) In the
130       event of any discrepancy between this version and the original IEEE and
131       The  Open Group Standard, the original IEEE and The Open Group Standard
132       is the referee document. The original Standard can be  obtained  online
133       at http://www.unix.org/online.html .
134
135       Any  typographical  or  formatting  errors that appear in this page are
136       most likely to have been introduced during the conversion of the source
137       files  to  man page format. To report such errors, see https://www.ker
138       nel.org/doc/man-pages/reporting_bugs.html .
139
140
141
142IEEE/The Open Group                  2013                   sys_resource.h(0P)
Impressum