[Top][All Lists]

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

Re: M4sh tests 77 and 78 vs /bin/sh -> dash

From: Paul Eggert
Subject: Re: M4sh tests 77 and 78 vs /bin/sh -> dash
Date: Fri, 13 Mar 2020 18:38:33 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 3/13/20 8:31 AM, Zack Weinberg wrote:

Thanks for taking care of that.  I wouldn't have been bold enough to
switch to sh -c.  Out of curiosity, what was the historical reason for
echoing the string into the shell?

Originally it was a big here-document, so big that I guess they assumed sh -c would have run afoul of string-length limits in passing a string to the shell. At some point somebody changed it to use 'echo', which kinda missed the point. But since we've been missing the point this long, it's pretty clear we needn't worry about string-length limits.

'sh -c' is about as safe as it gets, as long as the option-argument doesn't do silly things like end in backslash-newline (see "Invoking the Shell" in the Autoconf manual).

Also, this bug having gone unnoticed since 2013 says to me that we
need more tests for _AS_DETECT_BETTER_SHELL. Would you happen to have
time to write some?

Unfortunately not. I'm a bit tied up with Covid-19 stuff (nothing that serious; I'm not medical) and come to these threads mainly for stress relief.

reply via email to

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