From owner-freebsd-current Mon Apr 23 6: 8:32 2001 Delivered-To: freebsd-current@freebsd.org Received: from lurza.secnetix.de (lurza.secnetix.de [212.66.1.130]) by hub.freebsd.org (Postfix) with ESMTP id 3483637B43C for ; Mon, 23 Apr 2001 06:08:29 -0700 (PDT) (envelope-from olli@lurza.secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.9.3/8.9.3) id PAA18220; Mon, 23 Apr 2001 15:08:27 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Date: Mon, 23 Apr 2001 15:08:27 +0200 (CEST) Message-Id: <200104231308.PAA18220@lurza.secnetix.de> From: Oliver Fromme To: freebsd-current@FreeBSD.ORG Reply-To: freebsd-current@FreeBSD.ORG Subject: Re: cp -d dir patch for review (or 'xargs'?) In-Reply-To: <200104230521.WAA76392@gndrsh.dnsmgr.net> X-Newsgroups: list.freebsd-current User-Agent: tin/1.5.4-20000523 ("1959") (UNIX) (FreeBSD/4.1-RELEASE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Rodney W. Grimes wrote: > > Before anyone starts writing scripts, consider that {} will be > > replaced by xargs with (roughly) ARG_MAX - 10 characters worth of the > > stuff coming off the pipe. If your combined arguments plus > > environment exceeds ARG_MAX execve(2) will give you E2BIG. > > No rain here, it is ARG_MAX - 2048: > -s size > Set the maximum number of bytes for the command line length pro- > vided to utility. The sum of the length of the utility name and > the arguments passed to utility (including NULL terminators) will > be less than or equal to this number. The current default value > for size is ARG_MAX - 2048. > > 2K would be a pretty big env, root default std is about 367 bytes. > > Yes, that is probably not a portable assumption to make, but it is > far better than using non-standard options to xargs. If I'm not mistaken, the size of the environment is already taken into account by the xargs utility (subtracted from ARG_MAX). So this isn't an issue at all. Regards Oliver -- Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "All that we see or seem is just a dream within a dream" (E. A. Poe) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message