> Rodney W. Grimes <[EMAIL PROTECTED]> 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.

Unless xargs runs a command with lots of arguments and that command 
increases the environment size then tries to run another command with 
the same arguments - bang (E2BIG).

> 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)

-- 
Brian <[EMAIL PROTECTED]>                        <brian@[uk.]FreeBSD.org>
      <http://www.Awfulhak.org>                   <brian@[uk.]OpenBSD.org>
Don't _EVER_ lose your sense of humour !



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to