On Fri, Mar 14, 2014 at 01:45:25PM +0400, Pavel Emelyanov wrote: > > > > if (th) { > > rlimits are per task, why allocating them per thread? No, the idea behind is that we allocating them per thread group leader, ie when th = 1 _and_ tsk = 1 only.