3 ms·
I created just such a utility several years ago. It's called rlimit and is basically a command line interface to the standard getrlimit() and setrlimit() unix c
by jcoffland 12y ago
I created just such a utility several years ago. It's called rlimit and is basically a command line interface to the standard getrlimit() and setrlimit() unix calls. You can find it here http://freecode.com/projects/rlimit http://freecode.com/projects/rlimit. I'd be happy to move the source to GitHub.
- vezzy-fnord 12y agoulimit(1) is an interface precisely to the *rlimit calls that is a built-in to the Bash shell, and presumably others.
- jcoffland 12y agoulimit 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.