remove dependency list
[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.\"
3311b706 5.\" @(#)vlimit.3 6.2 (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
KM
16.ft B
17This facility is superseded by getrlimit(2).
18.ft R
19.PP
59c7bf5e
KM
20Limits the consumption by the current process and each process
21it creates to not individually exceed
22.I value
23on the specified
24.I resource.
25If
26.I value
27is specified as \-1, then the current limit is returned and the
28limit is unchanged.
29The resources which are currently controllable are:
30.TP 15
374b2a7f 31LIM_NORAISE
59c7bf5e
KM
32A pseudo-limit; if set non-zero then the limits may not be raised.
33Only the super-user may remove the \fInoraise\fR restriction.
34.TP 15
374b2a7f 35LIM_CPU
59c7bf5e
KM
36the maximum
37number of cpu-seconds to be used by each process
38.TP 15
374b2a7f 39LIM_FSIZE
59c7bf5e
KM
40the largest single file which can be created
41.TP 15
374b2a7f 42LIM_DATA
59c7bf5e
KM
43the maximum growth of the data+stack region via
44.IR sbrk (2)
45beyond the end of the program text
46.TP 15
374b2a7f 47LIM_STACK
59c7bf5e
KM
48the maximum
49size of the automatically-extended stack region
50.TP 15
374b2a7f 51LIM_CORE
59c7bf5e
KM
52the size of the largest core dump that will be created.
53.TP 15
374b2a7f 54LIM_MAXRSS
59c7bf5e
KM
55a soft limit for the amount of physical memory (in bytes) to be given
56to the program. If memory is tight, the system will prefer to take memory
57from processes which are exceeding their declared LIM_MAXRSS.
58.PP
59Because this information is stored in the per-process information
60this system call must be executed directly by the shell if it
61is to affect all future processes created by the shell;
62.I limit
63is thus a built-in command to
64.IR csh (1).
65.PP
66The system refuses to extend the data or stack space when the limits
67would be exceeded in the normal way; a
68.I break
69call fails if the data space limit is reached, or the process is
70killed when the stack limit is reached (since the stack cannot be
71extended, there is no way to send a signal!).
72.PP
73A file i/o operation which would create a file which is too large
74will cause a signal SIGXFSZ to be generated, this normally terminates
75the process, but may be caught.
76When the cpu time limit is exceeded, a signal SIGXCPU is sent to the
77offending process; to allow it time to process the signal it is
78given 5 seconds grace by raising the cpu time limit.
79.SH SEE ALSO
80csh(1)
81.SH BUGS
3311b706 82LIM_NORAISE no longer exists.