Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Apr 2001 16:43:24 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Brian Somers <brian@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org
Subject:   RE: cvs commit: src/usr.bin/xargs xargs.1
Message-ID:  <XFMail.010410164324.jhb@FreeBSD.org>
In-Reply-To: <200104102316.f3ANGtB15951@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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 <jhb@FreeBSD.org> -- 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010410164324.jhb>