bug-bash
[Top][All Lists]
Advanced

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

Re: EOF while in parse_matched_pair closes interactive shell


From: Chet Ramey
Subject: Re: EOF while in parse_matched_pair closes interactive shell
Date: Tue, 21 Feb 2023 11:03:59 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0

On 2/21/23 3:56 AM, Eduardo A. Bustamante López wrote:

Bash Version: 5.2
Patch Level: 15
Release Status: release

Description:

        The handling of EOF while parsing an (unmatched) quoted string changes
     between 5.1 and 5.2.  In 5.1, typing [Ctrl-d] alone while in the context of
     a quoted string in an interactive shell will report a syntax error, and
     prompt for a new command.  In 5.2, the same action does not report a syntax
     error, and instead the shell exits.

The shell should exit on EOF. Previous versions relied on undocumented
bison behavior, which resulted in a token that wasn't handled by the
grammar.

If there's a bug here, it's that interactive shells need to handle
IGNOREEOF in this case.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/




reply via email to

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