If you go this route of allowing arbitrary commands, I'd prefer to name
the variable RUN_PRECMDS, so that it can be used like this:
#RUN_PRECMDS+= echo cmd;
#RUN_PRECMDS+= ulimit -S -t 3600;
This way, it is possible to quickly enable or disable commands as needed.
Any better ideas? Would a more specific LIMIT_RESOURCES feature that is
analogous to UNLIMIT_RESOURCES be more appropriate, or just too complex?
As long as you need only the ulimit case, I prefer to have a more
specific API that only allows ulimit changes. That way, its purpose will
be clear even five years later.