From owner-freebsd-current@FreeBSD.ORG Thu Mar 3 12:36:51 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 F38861065672 for ; Thu, 3 Mar 2011 12:36:50 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id AD7658FC17 for ; Thu, 3 Mar 2011 12:36:49 +0000 (UTC) Received: by qwj8 with SMTP id 8so866110qwj.13 for ; Thu, 03 Mar 2011 04:36:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=dEuUiAQUruwY8tk8pXMS9faz1pYJAXywoCOZtpVK0OI=; b=n4cm66MC2V/7K57aUatzBRrBtFMAFgVenF5jZlfOVbVs2UM7wY9GHbPNpA/aqRPLrN 6sEJjSLSgEimX3wmwFc89dudhClTnK7MnWgq8yxLDSYQ6/DxCNi6RmFDNP5h1nT9jzpB pCALeKgAEEHLDsyWJZ6dQULxsXdDsOF5aCjv0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=f/h3AETU2b57kPuSX95vni7hbNtv/LWJNcfOHSdfanPc09QgvKHwDH34l+q7RtySj/ r2UFdadj9HJz5IMF5PVBTi2LgSaP/SwjHAwKG13u1stScnk49gA1Ce5GyKnF2GeRCLxk fQki4lqiFzIE/vddys7fSz/P94oANrB1MNfR0= MIME-Version: 1.0 Received: by 10.224.39.4 with SMTP id d4mr936886qae.235.1299154262985; Thu, 03 Mar 2011 04:11:02 -0800 (PST) Received: by 10.229.84.129 with HTTP; Thu, 3 Mar 2011 04:11:02 -0800 (PST) In-Reply-To: <4D6F6110.5060206@lissyara.su> References: <4D6F56B3.2020302@lissyara.su> <4D6F6110.5060206@lissyara.su> Date: Thu, 3 Mar 2011 15:11:02 +0300 Message-ID: From: Sergey Kandaurov To: Alex Keda Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: current@freebsd.org Subject: Re: 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 12:36:51 -0000 2011/3/3 Alex Keda : > 03.03.2011 11:52, Alex Keda =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >> >> I create login class: >> lissyara# grep id100 --after-context=3D7 /etc/login.conf >> id100:\ >> =C2=A0 =C2=A0 =C2=A0 =C2=A0:coredumpsize=3D1:\ >> =C2=A0 =C2=A0 =C2=A0 =C2=A0:cputime=3D60s:\ >> =C2=A0 =C2=A0 =C2=A0 =C2=A0:maxproc=3D12:\ >> =C2=A0 =C2=A0 =C2=A0 =C2=A0:openfiles=3D32:\ >> =C2=A0 =C2=A0 =C2=A0 =C2=A0:priority=3D20:\ >> =C2=A0 =C2=A0 =C2=A0 =C2=A0:tc=3Ddefault: >> >> lissyara# > > another parameters (I test cputime, priority) work correct > Indeed. and I was able to reproduce it too, fyi. That doesn't really work because cron doesn't perform further fork()s after RLIMIT_NPROC limit is set, but it only exec() a task. E.g. my cron implementation used at work does an additional fork necessary for some teardown work thus it doesn't suffer from this problem. --=20 wbr, pluknet