Re: noisy gnulib-tool on IRIX

2010-09-09 Thread Bruno Haible
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

Re: noisy gnulib-tool on IRIX

2010-09-09 Thread Bruno Haible
Eric Blake wrote: > here's the full > trace, showing that /bin/sh is ultimately rejected and the script rerun > under ksh for IRIX. Thanks. And we know that ksh has a working 'alias' command, so that gnulib-tool ends up getting a working 'echo' command in that shell. Bruno

Re: noisy gnulib-tool on IRIX

2010-09-08 Thread Eric Blake
On 09/08/2010 02:44 AM, Bruno Haible wrote: Hi Eric, hence the common idiom of first checking if alias/unalias exist using a subshell check, and if so then using them in the parent shell. Ah, I didn't think of this trick. But as you noticed, the trick I've found is more efficient, so I'll use

Re: noisy gnulib-tool on IRIX

2010-09-08 Thread Bruno Haible
Hi Eric, > hence the common idiom of first checking if alias/unalias exist using > a subshell check, and if so then using them in the parent shell. Ah, I didn't think of this trick. But as you noticed, the trick I've found is more efficient, so I'll use it. > $ /bin/sh -c 'alias 2>/dev/null' > a

Re: noisy gnulib-tool on IRIX

2010-09-07 Thread Ralf Wildenhues
* 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

Re: noisy gnulib-tool on IRIX

2010-09-07 Thread Eric Blake
[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

Re: noisy gnulib-tool on IRIX

2010-09-07 Thread Bruno Haible
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 with exec 3>&2 exec 2>/dev/null unalias echo exec 2>&3 exec 3>&- ? Bruno

noisy gnulib-tool on IRIX

2010-09-07 Thread Eric Blake
$ ./gnulib-tool --help 2>&1 | head -n3 alias: Not found unalias: Not found Usage: gnulib-tool --list Using a more detailed trace, I see: # Because of this, we have to play strange tricks with have_echo, to ensure # that the top-level statement containing the test starts after the 'alias' # comm