Blame man-pages-posix-2013-a/man0p/sys_resource.h.0p

Packit 7cfc04
'\" et
Packit 7cfc04
.TH sys_resource.h "0P" 2013 "IEEE/The Open Group" "POSIX Programmer's Manual"
Packit 7cfc04
.SH PROLOG
Packit 7cfc04
This manual page is part of the POSIX Programmer's Manual.
Packit 7cfc04
The Linux implementation of this interface may differ (consult
Packit 7cfc04
the corresponding Linux manual page for details of Linux behavior),
Packit 7cfc04
or the interface may not be implemented on Linux.
Packit 7cfc04
Packit 7cfc04
.SH NAME
Packit 7cfc04
sys/resource.h
Packit 7cfc04
\(em definitions for XSI resource operations
Packit 7cfc04
.SH SYNOPSIS
Packit 7cfc04
.LP
Packit 7cfc04
.nf
Packit 7cfc04
#include <sys/resource.h>
Packit 7cfc04
.fi
Packit 7cfc04
.SH DESCRIPTION
Packit 7cfc04
The
Packit 7cfc04
.IR <sys/resource.h> 
Packit 7cfc04
header shall define the following symbolic constants as possible values
Packit 7cfc04
of the
Packit 7cfc04
.IR which
Packit 7cfc04
argument of
Packit 7cfc04
\fIgetpriority\fR()
Packit 7cfc04
and
Packit 7cfc04
\fIsetpriority\fR():
Packit 7cfc04
.IP PRIO_PROCESS 16
Packit 7cfc04
Identifies the
Packit 7cfc04
.IR who
Packit 7cfc04
argument as a process ID.
Packit 7cfc04
.IP PRIO_PGRP 16
Packit 7cfc04
Identifies the
Packit 7cfc04
.IR who
Packit 7cfc04
argument as a process group ID.
Packit 7cfc04
.IP PRIO_USER 16
Packit 7cfc04
Identifies the
Packit 7cfc04
.IR who
Packit 7cfc04
argument as a user ID.
Packit 7cfc04
.P
Packit 7cfc04
The
Packit 7cfc04
.IR <sys/resource.h> 
Packit 7cfc04
header shall define the following type through
Packit 7cfc04
.BR typedef :
Packit 7cfc04
.IP "\fBrlim_t\fR" 16
Packit 7cfc04
Unsigned integer type used for limit values.
Packit 7cfc04
.P
Packit 7cfc04
The
Packit 7cfc04
.IR <sys/resource.h> 
Packit 7cfc04
header shall define the following symbolic constants, which shall have
Packit 7cfc04
values suitable for use in
Packit 7cfc04
.BR #if
Packit 7cfc04
preprocessing directives:
Packit 7cfc04
.IP RLIM_INFINITY 16
Packit 7cfc04
A value of
Packit 7cfc04
.BR rlim_t
Packit 7cfc04
indicating no limit.
Packit 7cfc04
.IP RLIM_SAVED_MAX 16
Packit 7cfc04
A value of type
Packit 7cfc04
.BR rlim_t
Packit 7cfc04
indicating an unrepresentable saved hard limit.
Packit 7cfc04
.IP RLIM_SAVED_CUR 16
Packit 7cfc04
A value of type
Packit 7cfc04
.BR rlim_t
Packit 7cfc04
indicating an unrepresentable saved soft limit.
Packit 7cfc04
.P
Packit 7cfc04
On implementations where all resource limits are representable in an
Packit 7cfc04
object of type
Packit 7cfc04
.BR rlim_t ,
Packit 7cfc04
RLIM_SAVED_MAX and RLIM_SAVED_CUR need not be distinct from
Packit 7cfc04
RLIM_INFINITY.
Packit 7cfc04
.P
Packit 7cfc04
The
Packit 7cfc04
.IR <sys/resource.h> 
Packit 7cfc04
header shall define the following symbolic constants as possible values
Packit 7cfc04
of the
Packit 7cfc04
.IR who
Packit 7cfc04
parameter of
Packit 7cfc04
\fIgetrusage\fR():
Packit 7cfc04
.IP RUSAGE_SELF 16
Packit 7cfc04
Returns information about the current process.
Packit 7cfc04
.IP RUSAGE_CHILDREN 16
Packit 7cfc04
Returns information about children of the current process.
Packit 7cfc04
.P
Packit 7cfc04
The
Packit 7cfc04
.IR <sys/resource.h> 
Packit 7cfc04
header shall define the
Packit 7cfc04
.BR rlimit
Packit 7cfc04
structure, which shall include at least the following members:
Packit 7cfc04
.sp
Packit 7cfc04
.RS 4
Packit 7cfc04
.nf
Packit 7cfc04
\fB
Packit 7cfc04
rlim_t rlim_cur  \fRThe current (soft) limit.\fR
Packit 7cfc04
rlim_t rlim_max  \fRThe hard limit.\fR
Packit 7cfc04
.fi \fR
Packit 7cfc04
.P
Packit 7cfc04
.RE
Packit 7cfc04
.P
Packit 7cfc04
The
Packit 7cfc04
.IR <sys/resource.h> 
Packit 7cfc04
header shall define the
Packit 7cfc04
.BR rusage
Packit 7cfc04
structure, which shall include at least the following members:
Packit 7cfc04
.sp
Packit 7cfc04
.RS 4
Packit 7cfc04
.nf
Packit 7cfc04
\fB
Packit 7cfc04
struct timeval ru_utime  \fRUser time used.\fR
Packit 7cfc04
struct timeval ru_stime  \fRSystem time used.\fR
Packit 7cfc04
.fi \fR
Packit 7cfc04
.P
Packit 7cfc04
.RE
Packit 7cfc04
.P
Packit 7cfc04
The
Packit 7cfc04
.IR <sys/resource.h> 
Packit 7cfc04
header shall define the
Packit 7cfc04
.BR timeval
Packit 7cfc04
structure as described in
Packit 7cfc04
.IR <sys/time.h> .
Packit 7cfc04
.P
Packit 7cfc04
The
Packit 7cfc04
.IR <sys/resource.h> 
Packit 7cfc04
header shall define the following symbolic constants as possible values
Packit 7cfc04
for the
Packit 7cfc04
.IR resource
Packit 7cfc04
argument of
Packit 7cfc04
\fIgetrlimit\fR()
Packit 7cfc04
and
Packit 7cfc04
\fIsetrlimit\fR():
Packit 7cfc04
.IP RLIMIT_CORE 16
Packit 7cfc04
Limit on size of
Packit 7cfc04
.BR core
Packit 7cfc04
file.
Packit 7cfc04
.IP RLIMIT_CPU 16
Packit 7cfc04
Limit on CPU time per process.
Packit 7cfc04
.IP RLIMIT_DATA 16
Packit 7cfc04
Limit on data segment size.
Packit 7cfc04
.IP RLIMIT_FSIZE 16
Packit 7cfc04
Limit on file size.
Packit 7cfc04
.IP RLIMIT_NOFILE 16
Packit 7cfc04
Limit on number of open files.
Packit 7cfc04
.IP RLIMIT_STACK 16
Packit 7cfc04
Limit on stack size.
Packit 7cfc04
.IP RLIMIT_AS 16
Packit 7cfc04
Limit on address space size.
Packit 7cfc04
.P
Packit 7cfc04
The following shall be declared as functions and may also be defined as
Packit 7cfc04
macros. Function prototypes shall be provided.
Packit 7cfc04
.sp
Packit 7cfc04
.RS 4
Packit 7cfc04
.nf
Packit 7cfc04
\fB
Packit 7cfc04
int  getpriority(int, id_t);
Packit 7cfc04
int  getrlimit(int, struct rlimit *);
Packit 7cfc04
int  getrusage(int, struct rusage *);
Packit 7cfc04
int  setpriority(int, id_t, int);
Packit 7cfc04
int  setrlimit(int, const struct rlimit *);
Packit 7cfc04
.fi \fR
Packit 7cfc04
.P
Packit 7cfc04
.RE
Packit 7cfc04
.P
Packit 7cfc04
The
Packit 7cfc04
.IR <sys/resource.h> 
Packit 7cfc04
header shall define the
Packit 7cfc04
.BR id_t
Packit 7cfc04
type through
Packit 7cfc04
.BR typedef ,
Packit 7cfc04
as described in
Packit 7cfc04
.IR <sys/types.h> .
Packit 7cfc04
.P
Packit 7cfc04
Inclusion of the
Packit 7cfc04
.IR <sys/resource.h> 
Packit 7cfc04
header may also make visible all symbols from
Packit 7cfc04
.IR <sys/time.h> .
Packit 7cfc04
.LP
Packit 7cfc04
.IR "The following sections are informative."
Packit 7cfc04
.SH "APPLICATION USAGE"
Packit 7cfc04
None.
Packit 7cfc04
.SH RATIONALE
Packit 7cfc04
None.
Packit 7cfc04
.SH "FUTURE DIRECTIONS"
Packit 7cfc04
None.
Packit 7cfc04
.SH "SEE ALSO"
Packit 7cfc04
.IR "\fB<sys_time.h>\fP",
Packit 7cfc04
.IR "\fB<sys_types.h>\fP"
Packit 7cfc04
.P
Packit 7cfc04
The System Interfaces volume of POSIX.1\(hy2008,
Packit 7cfc04
.IR "\fIgetpriority\fR\^(\|)",
Packit 7cfc04
.IR "\fIgetrlimit\fR\^(\|)",
Packit 7cfc04
.IR "\fIgetrusage\fR\^(\|)"
Packit 7cfc04
.SH COPYRIGHT
Packit 7cfc04
Portions of this text are reprinted and reproduced in electronic form
Packit 7cfc04
from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
Packit 7cfc04
-- Portable Operating System Interface (POSIX), The Open Group Base
Packit 7cfc04
Specifications Issue 7, Copyright (C) 2013 by the Institute of
Packit 7cfc04
Electrical and Electronics Engineers, Inc and The Open Group.
Packit 7cfc04
(This is POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
Packit 7cfc04
event of any discrepancy between this version and the original IEEE and
Packit 7cfc04
The Open Group Standard, the original IEEE and The Open Group Standard
Packit 7cfc04
is the referee document. The original Standard can be obtained online at
Packit 7cfc04
http://www.unix.org/online.html .
Packit 7cfc04
Packit 7cfc04
Any typographical or formatting errors that appear
Packit 7cfc04
in this page are most likely
Packit 7cfc04
to have been introduced during the conversion of the source files to
Packit 7cfc04
man page format. To report such errors, see
Packit 7cfc04
https://www.kernel.org/doc/man-pages/reporting_bugs.html .