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

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

 



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.




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux