[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash wrongly attaches subcommand stdin on syntax error
From: |
Chet Ramey |
Subject: |
Re: Bash wrongly attaches subcommand stdin on syntax error |
Date: |
Fri, 10 Apr 2015 16:09:28 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
On 4/7/15 6:56 AM, Sam Liddicott wrote:
> Bash Version: 4.3
> Patch Level: 11
> Release Status: release
>
> Description:
> Shell wrongly attaches stdin piped to command sequence with syntax error
>
> Repeat-By:
> On a login shell or interactive shell, paste the following command:
>
> for x in 1 ; do echo $( { echo } ) ; done < <( echo touch /tmp/x2 )
>
> The handling of the syntax error will cause stdin of the command
> to become attached to the login shell, which will then execute:
> touch /tmp/x2
> and then logout.
Thanks for the report. This will be fixed in the next release of bash.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/