2 .\" Copyright (c) 2001, The IEEE and The Open Group. All Rights Reserved. Portions Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
3 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
4 .\" http://www.opengroup.org/bookstore/.
5 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions 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.
6 .\" This notice shall appear on any product containing this material.
7 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
9 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
10 .TH RESOURCE.H 3HEAD "Sep 10, 2004"
12 resource.h, resource \- definitions for resource operations
16 #include <\fBsys/resource.h\fR>
22 The <\fBsys/resource.h\fR> header defines the symbolic constants listed below
23 as possible values of the \fIwhich\fR argument of \fBgetpriority()\fR and
24 \fBsetpriority()\fR. See \fBgetpriority\fR(3C).
28 \fB\fBPRIO_PROCESS\fR\fR
31 identifies the \fIwho\fR argument as a process ID
40 identifies the \fIwho\fR argument as a process group ID
49 identifies the \fIwho\fR argument as a user ID
54 The following type is defined through \fBtypedef\fR:
61 unsigned integer type used for limit values
66 The following symbolic constants are defined:
70 \fB\fBRLIM_INFINITY\fR\fR
73 a value of \fBrlim_t\fR indicating no limit
79 \fB\fBRLIM_SAVED_MAX\fR\fR
82 a value of type \fBrlim_t\fR indicating an unrepresentable saved hard limit
88 \fB\fBRLIM_SAVED_CUR\fR\fR
91 a value of type \fBrlim_t\fR indicating an unrepresentable saved soft limit
96 The symbolic constants listed below are defined as possible values of the
97 \fIwho\fR parameter of \fBgetrusage()\fR. See \fBgetrusage\fR(3C).
101 \fB\fBRUSAGE_SELF\fR\fR
104 returns information about the current process
110 \fB\fBRUSAGE_CHILDREN\fR\fR
113 returns information about children of the current process
118 The <\fBsys/resource.h\fR> header defines the \fBrlimit\fR structure, which
119 includes the following members:
123 rlim_t rlim_cur /* the current (soft) limit */
124 rlim_t rlim_max /* the hard limit */
130 The <\fBsys/resource.h\fR> header defines the \fBrusage\fR structure, which
131 includes the following members:
135 struct timeval ru_utime /* user time used */
136 struct timeval ru_stime /* system time used */
142 The \fBtimeval\fR structure is defined as described in <\fBsys/time.h\fR>.
145 The symbolic constants listed below are defined as possible values for the
146 \fIresource\fR argument of \fBgetrlimit()\fR and \fBsetrlimit()\fR. See
151 \fB\fBRLIMIT_CORE\fR\fR
154 limit on size of core dump file
160 \fB\fBRLIMIT_CPU\fR\fR
163 limit on CPU time per process
169 \fB\fBRLIMIT_DATA\fR\fR
172 limit on data segment size
178 \fB\fBRLIMIT_FSIZE\fR\fR
187 \fB\fBRLIMIT_NOFILE\fR\fR
190 limit on number of open files
196 \fB\fBRLIMIT_STACK\fR\fR
205 \fB\fBRLIMIT_AS\fR\fR
208 limit on address space size
213 The \fBid_t\fR type is defined through \fBtypedef\fR as described in
214 <\fBsys/types.h\fR>. See \fBtypes.h\fR(3HEAD).
217 Inclusion of the <\fBsys/resource.h\fR> header can also make visible all
218 symbols from <\fBsys/time.h\fR>. See \fBtime.h\fR(3HEAD).
222 See \fBattributes\fR(5) for descriptions of the following attributes:
230 ATTRIBUTE TYPE ATTRIBUTE VALUE
232 Interface Stability Standard
238 \fBgetrlimit\fR(2), \fBgetpriority\fR(3C), \fBtime.h\fR(3HEAD),
239 \fBtypes.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5)