From owner-cvs-all Tue Apr 10 16:44: 8 2001 Delivered-To: cvs-all@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id 57E7937B422; Tue, 10 Apr 2001 16:44:02 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.2/8.11.2) with ESMTP id f3ANhrG74154; Tue, 10 Apr 2001 16:43:53 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200104102316.f3ANGtB15951@freefall.freebsd.org> Date: Tue, 10 Apr 2001 16:43:24 -0700 (PDT) From: John Baldwin To: Brian Somers Subject: RE: cvs commit: src/usr.bin/xargs xargs.1 Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 10-Apr-01 Brian Somers wrote: > brian 2001/04/10 16:16:55 PDT > > Modified files: > usr.bin/xargs xargs.1 > Log: > o The -s limit is ARG_MAX - 4K, not ARG_MAX - 2K. > o Mention that the current environment is part of the -s calculation. > o Add a BUGS section that warns against executing a program that increases > the size of the argument list or the size of the environment. > > I have wondered for a while what the difference is between > > get a big list | xargs sudo command > > which fails and > > get a big list | sudo xargs command > > which succeeds. The answer is that in the first case, sudo expands > the environment and pushes the amount of data passed into execve over > the E2BIG threshold. Also, as a side note, the first command will do more forks than the first, as for each invocation of the 'command', sudo is invoked, whereas the second one only invokes sudo once to exec xargs. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message