From owner-freebsd-current@FreeBSD.ORG Thu Mar 3 09:19:10 2011 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6054B106566C for ; Thu, 3 Mar 2011 09:19:10 +0000 (UTC) (envelope-from admin@lissyara.su) Received: from mx.lissyara.su (mx.lissyara.su [77.73.25.118]) by mx1.freebsd.org (Postfix) with ESMTP id 1919D8FC08 for ; Thu, 3 Mar 2011 09:19:09 +0000 (UTC) Received: from [195.93.240.106] (port=12406 helo=lissyara.moskb.local) by mx.lissyara.su with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.74 (FreeBSD)) (envelope-from ) id 1Pv4GQ-0004dZ-Ua for current@FreeBSD.org; Thu, 03 Mar 2011 11:52:03 +0300 Message-ID: <4D6F56B3.2020302@lissyara.su> Date: Thu, 03 Mar 2011 11:52:03 +0300 From: Alex Keda User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; ru-RU; rv:1.8.1.23) Gecko/20091202 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: current@FreeBSD.org Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-White-List: YES X-Spam-Description: if spam count > 60 - this is spam X-Spam-Count: 0 X-White-List: YES X-Spam-Description: if spam count > 60 - this is spam X-Spam-Count: 0 X-Descriptions: powered by www.lissyara.su X-Bounce-ID: mx.lissyara.su Cc: Subject: login.conf: maxproc does not work when command running from cron? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2011 09:19:10 -0000 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)