bug-bash
[Top][All Lists]
Advanced

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

Re: Bash-3.2 Official Patch 20


From: Mike Frysinger
Subject: Re: Bash-3.2 Official Patch 20
Date: Sat, 25 Aug 2007 05:15:11 -0400
User-agent: KMail/1.9.7

On Friday 24 August 2007, Chet Ramey wrote:
>                            BASH PATCH REPORT
>                            =================
>
> Bash-Release: 3.2
> Patch-ID: bash32-020
>
> Bug-Reported-by:      Ian A Watson <WATSON_IAN_A@LILLY.COM>
> Bug-Reference-ID:     
> <OFEC551808.69D02C7F-ON8525729A.0045708D-8525729A.0046150
>B@EliLilly.lilly.com> Bug-Reference-URL:
>
> Bug-Description:
>
> In some cases of error processing, a jump back to the top-level processing
> loop from a builtin command  would leave the shell in an inconsistent
> state.

this appears to break handling of read only variables in source statements

consider:
$ cat test.sh
#!/bin/bash
unset MOO COW
cat << EOF > source-test.sh
MOO=1
UID=1
COW=1
EOF
source ./source-test.sh
echo WANT: MOO=1 COW=1
echo HAVE: MOO=$MOO COW=$COW

when run with bash versions before 3.2_p20, we see:
WANT: MOO=1 COW=1
HAVE: MOO=1 COW=1

when run with bash versions starting with 3.2_p20, we see:
WANT: MOO=1 COW=1
HAVE: MOO=1 COW=

in the case of Gentoo, we have some code that saves/reloads the entire 
environment in between invocations and we dont bother picking out the 
readonly variables ... so the env does not fully get reloaded as a readonly 
variable appears in the `set` output rather quickly :(
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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