3 ms·
ulimit can read and set limits for the current shell. rlimit set limits for a child process. Admittedly you could do nearly the same thing by setting limits wi
by jcoffland 12y ago
ulimit can read and set limits for the current shell. rlimit set limits for a child process. Admittedly you could do nearly the same thing by setting limits with ulimit, running the target command and then resetting the limits to their former state or by running a sub-shell, setting the limits there and then running your command in that environment. For example:
(ulimit -d 1024; <command>)
Or you could do it in one normal looking command with rlimit.
rlimit -d 1m <command>
Plus rlimit can set things like real-time priority which ulimit cannot.