Plan 9 from Bell Labs’s /usr/web/sources/contrib/fgb/root/sys/lib/ape/man/0/sys_resource.h

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved 
.TH "<sys/resource.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
.\" <sys/resource.h> 
.SH NAME
sys/resource.h \- definitions for XSI resource operations
.SH SYNOPSIS
.LP
\fB#include <sys/resource.h> \fP
.SH DESCRIPTION
.LP
The \fI<sys/resource.h>\fP header shall define the following symbolic
constants as possible values of the \fIwhich\fP
argument of \fIgetpriority\fP() and \fIsetpriority\fP():
.TP 7
PRIO_PROCESS
Identifies the \fIwho\fP argument as a process ID.
.TP 7
PRIO_PGRP
Identifies the \fIwho\fP argument as a process group ID.
.TP 7
PRIO_USER
Identifies the \fIwho\fP argument as a user ID.
.sp
.LP
The following type shall be defined through \fBtypedef\fP:
.TP 7
\fBrlim_t\fP
Unsigned integer type used for limit values.
.sp
.LP
The following symbolic constants shall be defined:
.TP 7
RLIM_INFINITY
A value of \fBrlim_t\fP indicating no limit.
.TP 7
RLIM_SAVED_MAX
A value of type \fBrlim_t\fP indicating an unrepresentable saved hard
limit.
.TP 7
RLIM_SAVED_CUR
A value of type \fBrlim_t\fP indicating an unrepresentable saved soft
limit.
.sp
.LP
On implementations where all resource limits are representable in
an object of type \fBrlim_t\fP, RLIM_SAVED_MAX and
RLIM_SAVED_CUR need not be distinct from RLIM_INFINITY.
.LP
The following symbolic constants shall be defined as possible values
of the \fIwho\fP parameter of \fIgetrusage\fP():
.TP 7
RUSAGE_SELF
Returns information about the current process.
.TP 7
RUSAGE_CHILDREN
Returns information about children of the current process.
.sp
.LP
The \fI<sys/resource.h>\fP header shall define the \fBrlimit\fP structure
that includes at least the following
members:
.sp
.RS
.nf

\fBrlim_t rlim_cur \fP The current (soft) limit. \fB
rlim_t rlim_max \fP The hard limit. \fB
\fP
.fi
.RE
.LP
The \fI<sys/resource.h>\fP header shall define the \fBrusage\fP structure
that includes at least the following
members:
.sp
.RS
.nf

\fBstruct timeval ru_utime \fP User time used. \fB
struct timeval ru_stime \fP System time used. \fB
\fP
.fi
.RE
.LP
The \fBtimeval\fP structure shall be defined as described in \fI<sys/time.h>\fP
\&.
.LP
The following symbolic constants shall be defined as possible values
for the \fIresource\fP argument of \fIgetrlimit\fP() and \fIsetrlimit\fP():
.TP 7
RLIMIT_CORE
Limit on size of \fBcore\fP file.
.TP 7
RLIMIT_CPU
Limit on CPU time per process.
.TP 7
RLIMIT_DATA
Limit on data segment size.
.TP 7
RLIMIT_FSIZE
Limit on file size.
.TP 7
RLIMIT_NOFILE
Limit on number of open files.
.TP 7
RLIMIT_STACK
Limit on stack size.
.TP 7
RLIMIT_AS
Limit on address space size.
.sp
.LP
The following shall be declared as functions and may also be defined
as macros. Function prototypes shall be provided.
.sp
.RS
.nf

\fBint  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 *);
\fP
.fi
.RE
.LP
The \fBid_t\fP type shall be defined through \fBtypedef\fP as described
in \fI<sys/types.h>\fP .
.LP
Inclusion of the \fI<sys/resource.h>\fP header may also make visible
all symbols from \fI<sys/time.h>\fP.
.LP
\fIThe following sections are informative.\fP
.SH APPLICATION USAGE
.LP
None.
.SH RATIONALE
.LP
None.
.SH FUTURE DIRECTIONS
.LP
None.
.SH SEE ALSO
.LP
\fI<sys/time.h>\fP, \fI<sys/types.h>\fP, the System Interfaces volume
of IEEE\ Std\ 1003.1-2001, \fIgetpriority\fP(), \fIgetrusage\fP(),
\fIgetrlimit\fP()
.SH COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 6, Copyright (C) 2001-2003 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 .

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.