For the new support of util-linux' prlimit to allow a command to be run
http://article.gmane.org/gmane.linux.utilities.util-linux-ng/5039
I tried to find a useful example for the manpage.

I found a nice, huge file to feed sort with - /dev/zero, and
my first try was to let the command be killed after 1 CPU second:

  ./prlimit --cpu=1 sort -u /dev/zero

Don't do that! ;-)

But as I was playing around with various different limits and values,
sort sometimes segfaulted:

  prlimit --stack=1000 --memlock=100000 --rss=1000 sort -u /dev/zero

Well, mostly (4/5 times) sort got correctly "Killed",
but a segfault smells.

Similar limit values (not leading to OOM killer) behaved the same.

OpenSuSE-11.4, sort from git.

Have a nice day,
Berny






Reply via email to