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