Why does "ulimit -t 5" have no effect on "less" or "man", but work on "yes"?

1

If I run

$ ulimit -t 5
$ yes

then yes gets killed after 5 seconds, but man and less/more don't.

Why are those two immune to ulimit?

Grezzo

Posted 2012-11-27T16:22:49.757

Reputation: 752

Answers

2

My guess is that it's because you are limiting CPU time and these apps spend most of their time waiting on input so they don't use much CPU. Try more-ing a largish file and holding down space until ps shows you have used 5 seconds of CPU.

Chris Nava

Posted 2012-11-27T16:22:49.757

Reputation: 7 009