bug-autoconf
[Top][All Lists]
Advanced

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

Re: [sr #107444] constructs generated by autoconf do not work in the ash


From: Paul Eggert
Subject: Re: [sr #107444] constructs generated by autoconf do not work in the ash shell
Date: Tue, 03 Aug 2010 11:28:52 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6

On 08/03/10 01:30, Mark Hobley wrote:

> Some versions of the ash shell will not allow redirection to a stream number
> held in a variable:
> 
>   # This construct does not work in some versions of the ash shell
>   echo $1 >&$2

What do these shells do?  For example, if /bin/ash is where your
ash lives, what does the following command do?

        /bin/ash -c 'set 1 2; echo $1 >&$2' >/dev/null

One way to address this problem is to have Autoconf-generated
scripts test whether the shell is buggy in this way, and to reject
any such shell, using something like _AS_DETECT_REQUIRED([_AS_GT_AMP_VAR])
(where _AS_GT_AMP_VAR is a new macro that tests for the bug).
This assumes that there is some other shell on your system that does not
have the bug, and that the Autoconf-generated script will find it.



reply via email to

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