login.conf: maxproc does not work when command running from cron?

From: Alex Keda <admin_at_lissyara.su>
Date: Thu, 03 Mar 2011 11:52:03 +0300
I create login class:
lissyara# grep id100 --after-context=7 /etc/login.conf
id100:\
         :coredumpsize=1:\
         :cputime=60s:\
         :maxproc=12:\
         :openfiles=32:\
         :priority=20:\
         :tc=default:

lissyara#

then, run command:

lissyara# cap_mkdb -v /etc/login.conf
cap_mkdb: 10 capability records
lissyara#

add user:

lissyara# grep ^test1234 /etc/master.passwd
test1234:$1$kj/WOTuN$vLGcOBPv9ro8eljOe.ChA1:1002:1004:id100:0:0:User 
&:/home/test1234:/bin/sh
lissyara#

add cron job for user:

lissyara# crontab -l -u test1234
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
lissyara#

after some time I see lot sleep processes in ps output

lissyara# ps -auxww | grep ^test1234 | grep sleep | wc -l
      130
lissyara#

130 > 12

========
If I running commands from ssh session - all OK, I cannot run more than 
maxproc processes...

tested on 8.1 (i386), 8.2 (i386), -CURRENT (amd64)
Received on Thu Mar 03 2011 - 08:19:10 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:12 UTC