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

Re: [Xen-devel] [OSSTEST PATCH 3/3] Shell fixup: Use bash in posix mode



On Thu, 2015-09-24 at 18:29 +0100, Ian Jackson wrote:
>   I have read through the wheezy
> bash(1) manpage and searched for posix, and the following behavioural
> differences are described:
> 
>  * Differences in interative startup (not relevant to us).
>  * Minor (irrelevant) differences in which startup files are read
>    during noninteractive startup.  (Eg, BASH_ENV not honoured.)
>  * Differences to the parsing of invocations of `time'
>  * `test a == b' may be unsupported (but it's wrong and we say `=')
>  * -e not inherited by some subshells (this is what I am trying to fix)
>  * `.' and `source' do not search the cwd.
>  * `set' with no arguments does not print shell functions etc.

I expected this to also disable "[[ expression ]]", "$((maths))", array
variables and in particular $PIPESTATUS too, but it looks like I was wrong
and it doesn't disable bash _extensions_, just areas where bash differs
from what posix specifies.

Of those we seem to use $((maths)) and $PIPESTATUS (once in the standalone
wrapper), although array variables are tricky to grep for.

I also found http://tiswww.case.edu/php/chet/bash/POSIX (referenced from
the manpage) handy.

> I have done some ad-hoc testing but it seems like much of this is
> difficult to test.  I suggest we push it at a time when we can keep a
> close eye on the behaviour.

Agreed.

> Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.