I did a different approach this time. Only capped the number of processes a user can run.
$ ulimit -u 512 $ nice -n 19 ./machine-update -m send-mail: fork: Resource temporarily unavailable bsd-mailx is acting like a fork bomb or whatever. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/777533 Title: mailx swapped heavily until mouse and keyboard went unresponsive -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs