bug-bash
[Top][All Lists]
Advanced

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

Re: read-only flag is lost for functions in sub shells


From: Linda Walsh
Subject: Re: read-only flag is lost for functions in sub shells
Date: Thu, 31 Jul 2014 07:51:01 -0700
User-agent: Thunderbird



Chet Ramey wrote:
On 7/30/14, 6:11 PM, Linda Walsh wrote:
If I assigned the read-only bit to an exported var and run a new
shell, that var is still read-only.

No:

$ ./bash ./x24
4.2.47(4)-release
foo = one
foo = two
$ cat ./x24
echo $BASH_VERSION

foo=one
readonly foo
export foo

./bash -c 'echo foo = $foo ; foo=two ; echo foo = $foo'

When did that change?


I thought the idea of RO vars being passed to children was considered
desirable?  (Not that I liked it that much, but am having some of my functions
overwritten now when I didn't before... some odd things happening with .bashrc
not being read @ login and not sure why, since I thought it was suppose to
be read for any interactive shell







reply via email to

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