📄 vlimit.3
字号:
.\" Copyright (c) 1980, 1991, 1993.\" The Regents of the University of California. All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\" notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\" notice, this list of conditions and the following disclaimer in the.\" documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\" must display the following acknowledgement:.\" This product includes software developed by the University of.\" California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\" may be used to endorse or promote products derived from this software.\" without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\" @(#)vlimit.3 8.1 (Berkeley) 6/4/93.\".Dd June 4, 1993.Dt VLIMIT 3.Os BSD 4.Sh NAME.Nm vlimit.Nd control maximum system resource consumption.Sh SYNOPSIS.Fd #include <sys/vlimit.h>.Fn vlimit resource value.Sh DESCRIPTION.Bf -symbolicThis interface is obsoleted by getrlimit(2).It is available from the compatibility library, libcompat..Ef.PpLimits the consumption by the current process and each processit creates to not individually exceed .Fa valueon the specified.Fa resource .If.Fa valueis specified as \-1, then the current limit is returned and thelimit is unchanged.The resources which are currently controllable are:.Bl -tag -width LIM_NORAISE.It Dv LIM_NORAISEA pseudo-limit; if set non-zero then the limits may not be raised.Only the super-user may remove the.Em noraiserestriction..It Dv LIM_CPUthe maximumnumber of cpu-seconds to be used by each process.It Dv LIM_FSIZEthe largest single file which can be created.It Dv LIM_DATAthe maximum growth of the data+stack region via.Xr sbrk 2beyond the end of the program text.It Dv LIM_STACKthe maximumsize of the automatically-extended stack region.It Dv LIM_COREthe size of the largest core dump that will be created..It Dv LIM_MAXRSSa soft limit for the amount of physical memory (in bytes) to be givento the program. If memory is tight, the system will prefer to take memoryfrom processes which are exceeding their declared.Dv LIM_MAXRSS..El.PpBecause this information is stored in the per-process informationthis system call must be executed directly by the shell if itis to affect all future processes created by the shell;.Xr limitis thus a built-in command to.Xr csh 1 ..PpThe system refuses to extend the data or stack space when the limitswould be exceeded in the normal way; a.Xr break 2call fails if the data space limit is reached, or the process iskilled when the stack limit is reached (since the stack cannot beextended, there is no way to send a signal!)..PpA file.Tn I/Ooperation which would create a file which is too largewill cause a signal.Dv SIGXFSZto be generated, this normally terminatesthe process, but may be caught.When the cpu time limit is exceeded, a signal.Dv SIGXCPUis sent to theoffending process; to allow it time to process the signal it isgiven 5 seconds grace by raising the.Tn CPUtime limit..Sh SEE ALSO.Xr csh 1.Sh HISTORYThe.Fn vlimitfunction appeared in .Bx 4.2 ..Sh BUGS.Dv LIM_NORAISEno longer exists.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -