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