From owner-freebsd-questions@FreeBSD.ORG Wed Feb 27 09:16:28 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58448106566B for ; Wed, 27 Feb 2008 09:16:28 +0000 (UTC) (envelope-from norgaard@locolomo.org) Received: from mail.locolomo.org (97.pool85-48-194.static.orange.es [85.48.194.97]) by mx1.freebsd.org (Postfix) with ESMTP id 1062113C4EE for ; Wed, 27 Feb 2008 09:16:23 +0000 (UTC) (envelope-from norgaard@locolomo.org) Received: from Home.local (32.Red-80-37-158.staticIP.rima-tde.net [80.37.158.32]) by mail.locolomo.org (Postfix) with ESMTP id 9DE411C0847; Wed, 27 Feb 2008 10:16:21 +0100 (CET) Message-ID: <47C52A64.5000701@locolomo.org> Date: Wed, 27 Feb 2008 10:16:20 +0100 From: Erik Norgaard User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Wojciech Puchar References: <20080227100132.G1831@wojtek.tensor.gdynia.pl> In-Reply-To: <20080227100132.G1831@wojtek.tensor.gdynia.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: argument list too long X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2008 09:16:28 -0000 Wojciech Puchar wrote: > what is a limit of amount of arguments passed to program? is it > hardwired or can be changed. > > i found it to be in order of few thousands parameteres searching google results in an article for linux http://www.linuxjournal.com/article/6060 gives some ideas to work arounds, the most radical to recompile the kernel. Then a sysctl -a seems to indicate it is also a kernel limitation on FreeBSD: kern.argmax: 262144 I'm not certain that this is the limit of command line arguments, and I haven't tried to set it. Nor is it clear to me if this is the number of arguments or the number of characters in the argument string. In the latter case, a "few thousand" argumenst could easily reach that limit. Cheers, Erik