pluralize it...
[unix-history] / usr / src / lib / libcompat / 4.1 / vlimit.3
CommitLineData
59c7bf5e
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
79e6b3c8 5.\" @(#)vlimit.3 6.3 (Berkeley) %G%
59c7bf5e 6.\"
0223f0b6 7.TH VLIMIT 3C ""
59c7bf5e
KM
8.UC 4
9.SH NAME
10vlimit \- control maximum system resource consumption
11.SH SYNOPSIS
12.B "#include <sys/vlimit.h>"
13.PP
14.B vlimit(resource, value)
15.SH DESCRIPTION
374b2a7f 16.ft B
79e6b3c8
KB
17This interface is obsoleted by getrlimit(2).
18.br
19It is available from the compatibility library, libcompat.
374b2a7f
KM
20.ft R
21.PP
59c7bf5e
KM
22Limits the consumption by the current process and each process
23it creates to not individually exceed
24.I value
25on the specified
26.I resource.
27If
28.I value
29is specified as \-1, then the current limit is returned and the
30limit is unchanged.
31The resources which are currently controllable are:
32.TP 15
374b2a7f 33LIM_NORAISE
59c7bf5e
KM
34A pseudo-limit; if set non-zero then the limits may not be raised.
35Only the super-user may remove the \fInoraise\fR restriction.
36.TP 15
374b2a7f 37LIM_CPU
59c7bf5e
KM
38the maximum
39number of cpu-seconds to be used by each process
40.TP 15
374b2a7f 41LIM_FSIZE
59c7bf5e
KM
42the largest single file which can be created
43.TP 15
374b2a7f 44LIM_DATA
59c7bf5e
KM
45the maximum growth of the data+stack region via
46.IR sbrk (2)
47beyond the end of the program text
48.TP 15
374b2a7f 49LIM_STACK
59c7bf5e
KM
50the maximum
51size of the automatically-extended stack region
52.TP 15
374b2a7f 53LIM_CORE
59c7bf5e
KM
54the size of the largest core dump that will be created.
55.TP 15
374b2a7f 56LIM_MAXRSS
59c7bf5e
KM
57a soft limit for the amount of physical memory (in bytes) to be given
58to the program. If memory is tight, the system will prefer to take memory
59from processes which are exceeding their declared LIM_MAXRSS.
60.PP
61Because this information is stored in the per-process information
62this system call must be executed directly by the shell if it
63is to affect all future processes created by the shell;
64.I limit
65is thus a built-in command to
66.IR csh (1).
67.PP
68The system refuses to extend the data or stack space when the limits
69would be exceeded in the normal way; a
70.I break
71call fails if the data space limit is reached, or the process is
72killed when the stack limit is reached (since the stack cannot be
73extended, there is no way to send a signal!).
74.PP
75A file i/o operation which would create a file which is too large
76will cause a signal SIGXFSZ to be generated, this normally terminates
77the process, but may be caught.
78When the cpu time limit is exceeded, a signal SIGXCPU is sent to the
79offending process; to allow it time to process the signal it is
80given 5 seconds grace by raising the cpu time limit.
81.SH SEE ALSO
82csh(1)
83.SH BUGS
3311b706 84LIM_NORAISE no longer exists.