[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: read builtin disregards IFS when interrupted by trapped signal
From: |
Chet Ramey |
Subject: |
Re: read builtin disregards IFS when interrupted by trapped signal |
Date: |
Wed, 20 Jul 2016 20:51:46 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
On 7/20/16 9:01 AM, Andriy Martynets wrote:
> Bash Version: 4.3
> Patch Level: 42
> Release Status: release
>
> Description:
> The read builtin disregards (or sporadically uses unpredictable value of)
> the IFS variable when is interrupted by a trapped signal.
>
> Repeat-By:
> - install a trap for a signal, say SIGALRM or SIGUSR1
> - cycle read from a process with a custom IFS to split read string into
> variables
> - each interrupted read will return the string splitted in wrong way
Thanks for the report. The traps shouldn't assume and run with the
temporary environment. This will be fixed in bash-4.4.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/