autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fewer forks during shell detection


From: Eric Blake
Subject: Re: fewer forks during shell detection
Date: Fri, 14 Nov 2008 07:06:15 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/20080914 Thunderbird/2.0.0.17 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Ralf Wildenhues on 11/12/2008 12:00 PM:
> I think you should be able to use
>   echo '...' 2>/dev/null | ./foo 2>/dev/null
> 
>> But I don't think we have to worry about this unless we get actual
>> reports of a noisy echo.
> 
> Well, tell me where in the code this construct is used, and I will
> check whether it can be exposed.

This construct is in _AS_RUN, which is used very early in the script as
part of selecting a better shell.  If you've bootstrapped with a recent
autoconf, look for:

if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
          { $as_echo "$as_bourne_compatible""$as_required" | \
  as_run=a "$as_shell"; } 2>/dev/null; then

And since that 2>/dev/null is outside the {;}, we're probably okay in this
case.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkdhdcACgkQ84KuGfSFAYCG9QCfZ927j7cZRSuiEkzjxBvWPE+z
QJMAoNkJnsKVV9WhJ7dkATTHbqeW+lmq
=pjf2
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]