Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14140

[BUG] assignments preceding 'read' persist past command in POSIX mode

Path csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Martijn Dekker <martijn@inlv.org>
Newsgroups gnu.bash.bug
Subject [BUG] assignments preceding 'read' persist past command in POSIX mode
Date Thu, 24 May 2018 23:23:34 +0200
Lines 13
Approved bug-bash@gnu.org
Message-ID <mailman.421.1527197023.1292.bug-bash@gnu.org> (permalink)
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace usenet.stanford.edu 1527197024 6537 208.118.235.17 (24 May 2018 21:23:44 GMT)
X-Complaints-To action@cs.stanford.edu
To Bug reports for the GNU Bourne Again SHell <bug-bash@gnu.org>
Envelope-to bug-bash@gnu.org
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.7.0
Content-Language en-GB
X-detected-operating-system by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From 37.59.109.123
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.21
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <http://lists.gnu.org/archive/html/bug-bash/>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
Xref csiph.com gnu.bash.bug:14140

Show key headers only | View raw


In bash-20180511 and bash-20180518 snapshots and in bash 5.0.0-alpha, in 
POSIX mode, assignments preceding 'read' incorrectly persist past the 
command. 'read' is a regular builtin so they should not persist.

$ ./bash -o posix -c 'v=ok; v=bug read x </dev/null; echo "$v"'
bug

This is especially problematic because IFS assignments persist too.

Thanks,

- M.

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

[BUG] assignments preceding 'read' persist past command in POSIX mode Martijn Dekker <martijn@inlv.org> - 2018-05-24 23:23 +0200

csiph-web