Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ vlimit(3C) — UTek W2.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

csh(1csh)

fork(2)

getrlimit(2)

sbrk(2)



VLIMIT(3C)              COMMAND REFERENCE              VLIMIT(3C)



NAME
     vlimit - control maximum system resource consumption

SYNOPSIS
     #include <sys/vlimit.h>

     vlimit(resource, value)

DESCRIPTION
     This facility is superseded by getrlimit(2).

     Vlimit limits the consumption by the current process and
     each process it creates to not individually exceed value on
     the specified resource. If value is specified as -1, then
     the current limit is returned and the limit is unchanged.
     The resources which are currently controllable are:

     LIM_NORAISE    A pseudo-limit; if set non-zero then the
                    limits may not be raised.  Only the super-
                    user may remove the noraise restriction.

     LIM_CPU        the maximum number of cpu-seconds to be used
                    by each process

     LIM_FSIZE      the largest single file which can be created

     LIM_DATA       the maximum growth of the data+stack region
                    via sbrk(2) beyond the end of the program
                    text

     LIM_STACK      the maximum size of the automatically-
                    extended stack region

     LIM_CORE       the size of the largest core dump that will
                    be created.

     LIM_MAXRSS     a soft limit for the amount of physical
                    memory (in bytes) to be given to the program.
                    If memory is tight, the system will prefer to
                    take memory from processes which are
                    exceeding their declared LIM_MAXRSS.

     Because this information is stored in the per-process
     information this system call must be executed directly by
     the shell if it is to affect all future processes created by
     the shell; therefore, sh(1sh) and csh(1csh) have builtin
     commands to set limits, called ulimit(1sh) and limit(1csh),
     respectively.

     The system refuses to extend the data or stack space when
     the limits would be exceeded in the normal way; a break call
     fails if the data space limit is reached, or the process is



Printed 10/17/86                                                1





VLIMIT(3C)              COMMAND REFERENCE              VLIMIT(3C)



     killed when the stack limit is reached (since the stack
     cannot be extended, there is no way to send a signal!).

     A file i/o operation which would create a file which is too
     large will cause a signal SIGXFSZ to be generated, this
     normally terminates the process, but may be caught.  When
     the cpu time limit is exceeded, a signal SIGXCPU is sent to
     the offending process; to allow it time to process the
     signal it is given 5 seconds grace by raising the cpu time
     limit.

CAVEATS
     If LIM_NORAISE is set, then no grace should be given when
     the cpu time limit is exceeded.

SEE ALSO
     csh(1csh), fork(2), getrlimit(2), sbrk(2).






































Printed 10/17/86                                                2





































































%%index%%
na:72,88;
sy:160,381;
de:541,2379;3064,514;
ca:3578,151;
se:3729,188;
%%index%%000000000103

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026