Ralf Wildenhues wrote:
> > (hmm, maybe autoconf should use that trick to reduce
> > forking at m4sh startup).
>
> exec 3>&2 2>/dev/null; command; exec 2>&3 3>&-
>
> has the advantage of not forking, the disadvantage of using another file
> descriptor (which we should probably disallow the user
On 09/08/2010 10:18 AM, Eric Blake wrote:
With modern shells, it should work just as well to
{ command; } 2>/dev/null
except of course, really old shells will fork a subshell in order to
execute redirected compound commands, so unless we have some indication
that this was fixed before some other
[dropping bug-gnulib]
On 09/07/2010 11:38 PM, Ralf Wildenhues wrote:
(hmm, maybe autoconf should use that trick to reduce
forking at m4sh startup).
exec 3>&2 2>/dev/null; command; exec 2>&3 3>&-
has the advantage of not forking, the disadvantage of using another file
descriptor (which we s
* Eric Blake wrote on Wed, Sep 08, 2010 at 03:12:48AM CEST:
> $ /bin/sh -c 'alias 2>/dev/null'
> alias: Not found
> $ /bin/sh -c '(alias) 2>/dev/null'
> $ /bin/sh -c 'exec 3>&2; exec 2>/dev/null; unalias echo; exec 2>&3;
> exec 3>&-'
> $
>
> the indirect redirection of stderr prior to attempting t
[adding bug-autoconf for a potential optimization]
On 09/07/2010 06:14 PM, Bruno Haible wrote:
Eric Blake wrote:
$ ./gnulib-tool --help 2>&1 | head -n3
alias: Not found
unalias: Not found
Usage: gnulib-tool --list
What happens if you replace the command
unalias echo 2>/dev/null
The poin