1 .\" Copyright (c) 1980, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)vlimit.3 8.1 (Berkeley) 6/4/93
40 .Nd control maximum system resource consumption
42 .Fd #include <sys/vlimit.h>
43 .Fn vlimit resource value
46 This interface is obsoleted by getrlimit(2).
47 It is available from the compatibility library, libcompat.
50 Limits the consumption by the current process and each process
51 it creates to not individually exceed
57 is specified as \-1, then the current limit is returned and the
59 The resources which are currently controllable are:
60 .Bl -tag -width LIM_NORAISE
62 A pseudo-limit; if set non-zero then the limits may not be raised.
63 Only the super-user may remove the
68 number of cpu-seconds to be used by each process
70 the largest single file which can be created
72 the maximum growth of the data+stack region via
74 beyond the end of the program text
77 size of the automatically-extended stack region
79 the size of the largest core dump that will be created.
81 a soft limit for the amount of physical memory (in bytes) to be given
82 to the program. If memory is tight, the system will prefer to take memory
83 from processes which are exceeding their declared
87 Because this information is stored in the per-process information
88 this system call must be executed directly by the shell if it
89 is to affect all future processes created by the shell;
91 is thus a built-in command to
94 The system refuses to extend the data or stack space when the limits
95 would be exceeded in the normal way; a
97 call fails if the data space limit is reached, or the process is
98 killed when the stack limit is reached (since the stack cannot be
99 extended, there is no way to send a signal!).
103 operation which would create a file which is too large
106 to be generated, this normally terminates
107 the process, but may be caught.
108 When the cpu time limit is exceeded, a signal
111 offending process; to allow it time to process the signal it is
112 given 5 seconds grace by raising the
126 This function has not yet been reimplemented.