Ralf Wildenhues wrote:
> > The LDDPROG can also be used outside the shell wrapper, by other macros
> > or Makefile commands, where LC_ALL=C is not necessarily guaranteed. But
> > it will probably not hurt if I put LC_ALL=C before any LDDPROG value.
>
> Yes, good argument.  I think it would be even better to use
>   LDDPROG="env LC_ALL=C $LDDPROG"
>
> to facilitate `exec $LDDPROG', and other situations where the first
> component is really supposed to be a program.  You could use exec in
> ldd.sh.

I cannot use exec in ldd.sh, since the output of the command is piped
through a sed command.

Even if I could use exec there, "exec env LC_ALL=C $LDDPROG" is slower
than "LC_ALL=C $LDDPROG", because "env" costs 1 fork() and 1 exec()
whereas "exec" optimizes away only the fork() - the exec() remains
additional burden. The optimal way to write it in this case is
"LC_ALL=C exec $LDDPROG".

Bruno



_______________________________________________
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib

Reply via email to