softlimit — change resource limit then chain
softlimit [limits...] {next-prog}
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:
bytes]sets
RLIMIT_AS, RLIMIT_DATA, RLIMIT_MEMLOCK, and RLIMIT_STACK
bytes]sets RLIMIT_AS
bytes]sets RLIMIT_CORE
bytes]sets RLIMIT_DATA
bytes]sets RLIMIT_FSIZE
bytes]sets RLIMIT_MEMLOCK
n]sets RLIMIT_NOFILE
n]sets RLIMIT_NPROC
n]sets RLIMIT_RSS
bytes]sets RLIMIT_STACK
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).