Name

softlimit — change resource limit then chain

Synopsis

softlimit [limits...] {next-prog}

Description

softlimit is a chain-loading utility that changes its soft resource limits and then chain loads to next-prog with the execvp(3) function.

next-prog may contain its own command line options, which softlimit will ignore.

The following limit options are available:

[-m bytes]

sets RLIMIT_AS, RLIMIT_DATA, RLIMIT_MEMLOCK, and RLIMIT_STACK

[-a bytes]

sets RLIMIT_AS

[-c bytes]

sets RLIMIT_CORE

[-d bytes]

sets RLIMIT_DATA

[-f bytes]

sets RLIMIT_FSIZE

[-l bytes]

sets RLIMIT_MEMLOCK

[-o n]

sets RLIMIT_NOFILE

[-p n]

sets RLIMIT_NPROC

[-r n]

sets RLIMIT_RSS

[-s bytes]

sets RLIMIT_STACK

[-t seconds]

sets RLIMIT_CPU

See setrlimit(1) for an explanation of these limits.

To set an "infinite" limit, use the text unlimited for the limit value. Similarly, the text = or hard will use the current value of the hard limit as the value. (This provides a simple means of setting the soft limit to the hard limit ceiling without knowing its current value.)

Special treatment is given to the [-m] option because it sets multiple limits at once. An attempt to set any one soft limit greater than the matching hard limit will be silently converted into an attempt to set the soft limit equal to the hard limit.

For a command with coarser granularity, that can also set hard limits, see ulimit(1).

Author

Jonathan de Boyne Pollard