logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

sys_resource.h.0p (4786B)


  1. '\" et
  2. .TH sys_resource.h "0P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. sys/resource.h
  12. \(em definitions for XSI resource operations
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <sys/resource.h>
  17. .fi
  18. .SH DESCRIPTION
  19. The
  20. .IR <sys/resource.h>
  21. header shall define the following symbolic constants as possible values
  22. of the
  23. .IR which
  24. argument of
  25. \fIgetpriority\fR()
  26. and
  27. \fIsetpriority\fR():
  28. .IP PRIO_PROCESS 16
  29. Identifies the
  30. .IR who
  31. argument as a process ID.
  32. .IP PRIO_PGRP 16
  33. Identifies the
  34. .IR who
  35. argument as a process group ID.
  36. .IP PRIO_USER 16
  37. Identifies the
  38. .IR who
  39. argument as a user ID.
  40. .P
  41. The
  42. .IR <sys/resource.h>
  43. header shall define the following type through
  44. .BR typedef :
  45. .IP "\fBrlim_t\fR" 16
  46. Unsigned integer type used for limit values.
  47. .P
  48. The
  49. .IR <sys/resource.h>
  50. header shall define the following symbolic constants, which shall have
  51. values suitable for use in
  52. .BR #if
  53. preprocessing directives:
  54. .IP RLIM_INFINITY 16
  55. A value of
  56. .BR rlim_t
  57. indicating no limit.
  58. .IP RLIM_SAVED_MAX 16
  59. A value of type
  60. .BR rlim_t
  61. indicating an unrepresentable saved hard limit.
  62. .IP RLIM_SAVED_CUR 16
  63. A value of type
  64. .BR rlim_t
  65. indicating an unrepresentable saved soft limit.
  66. .P
  67. On implementations where all resource limits are representable in an
  68. object of type
  69. .BR rlim_t ,
  70. RLIM_SAVED_MAX and RLIM_SAVED_CUR need not be distinct from
  71. RLIM_INFINITY.
  72. .P
  73. The
  74. .IR <sys/resource.h>
  75. header shall define the following symbolic constants as possible values
  76. of the
  77. .IR who
  78. parameter of
  79. \fIgetrusage\fR():
  80. .IP RUSAGE_SELF 16
  81. Returns information about the current process.
  82. .IP RUSAGE_CHILDREN 16
  83. Returns information about children of the current process.
  84. .P
  85. The
  86. .IR <sys/resource.h>
  87. header shall define the
  88. .BR rlimit
  89. structure, which shall include at least the following members:
  90. .sp
  91. .RS 4
  92. .nf
  93. rlim_t rlim_cur \fRThe current (soft) limit.\fR
  94. rlim_t rlim_max \fRThe hard limit.\fR
  95. .fi
  96. .P
  97. .RE
  98. .P
  99. The
  100. .IR <sys/resource.h>
  101. header shall define the
  102. .BR rusage
  103. structure, which shall include at least the following members:
  104. .sp
  105. .RS 4
  106. .nf
  107. struct timeval ru_utime \fRUser time used.\fR
  108. struct timeval ru_stime \fRSystem time used.\fR
  109. .fi
  110. .P
  111. .RE
  112. .P
  113. The
  114. .IR <sys/resource.h>
  115. header shall define the
  116. .BR timeval
  117. structure as described in
  118. .IR <sys/time.h> .
  119. .P
  120. The
  121. .IR <sys/resource.h>
  122. header shall define the following symbolic constants as possible values
  123. for the
  124. .IR resource
  125. argument of
  126. \fIgetrlimit\fR()
  127. and
  128. \fIsetrlimit\fR():
  129. .IP RLIMIT_CORE 16
  130. Limit on size of
  131. .BR core
  132. file.
  133. .IP RLIMIT_CPU 16
  134. Limit on CPU time per process.
  135. .IP RLIMIT_DATA 16
  136. Limit on data segment size.
  137. .IP RLIMIT_FSIZE 16
  138. Limit on file size.
  139. .IP RLIMIT_NOFILE 16
  140. Limit on number of open files.
  141. .IP RLIMIT_STACK 16
  142. Limit on stack size.
  143. .IP RLIMIT_AS 16
  144. Limit on address space size.
  145. .P
  146. The following shall be declared as functions and may also be defined as
  147. macros. Function prototypes shall be provided.
  148. .sp
  149. .RS 4
  150. .nf
  151. int getpriority(int, id_t);
  152. int getrlimit(int, struct rlimit *);
  153. int getrusage(int, struct rusage *);
  154. int setpriority(int, id_t, int);
  155. int setrlimit(int, const struct rlimit *);
  156. .fi
  157. .P
  158. .RE
  159. .P
  160. The
  161. .IR <sys/resource.h>
  162. header shall define the
  163. .BR id_t
  164. type through
  165. .BR typedef ,
  166. as described in
  167. .IR <sys/types.h> .
  168. .P
  169. Inclusion of the
  170. .IR <sys/resource.h>
  171. header may also make visible all symbols from
  172. .IR <sys/time.h> .
  173. .LP
  174. .IR "The following sections are informative."
  175. .SH "APPLICATION USAGE"
  176. None.
  177. .SH RATIONALE
  178. None.
  179. .SH "FUTURE DIRECTIONS"
  180. None.
  181. .SH "SEE ALSO"
  182. .IR "\fB<sys_time.h>\fP",
  183. .IR "\fB<sys_types.h>\fP"
  184. .P
  185. The System Interfaces volume of POSIX.1\(hy2017,
  186. .IR "\fIgetpriority\fR\^(\|)",
  187. .IR "\fIgetrlimit\fR\^(\|)",
  188. .IR "\fIgetrusage\fR\^(\|)"
  189. .\"
  190. .SH COPYRIGHT
  191. Portions of this text are reprinted and reproduced in electronic form
  192. from IEEE Std 1003.1-2017, Standard for Information Technology
  193. -- Portable Operating System Interface (POSIX), The Open Group Base
  194. Specifications Issue 7, 2018 Edition,
  195. Copyright (C) 2018 by the Institute of
  196. Electrical and Electronics Engineers, Inc and The Open Group.
  197. In the event of any discrepancy between this version and the original IEEE and
  198. The Open Group Standard, the original IEEE and The Open Group Standard
  199. is the referee document. The original Standard can be obtained online at
  200. http://www.opengroup.org/unix/online.html .
  201. .PP
  202. Any typographical or formatting errors that appear
  203. in this page are most likely
  204. to have been introduced during the conversion of the source files to
  205. man page format. To report such errors, see
  206. https://www.kernel.org/doc/man-pages/reporting_bugs.html .