[prev in list] [next in list] [prev in thread] [next in thread]
List: bash-bug
Subject: Re: SIGINT in a sourced script does not clean up some special variables
From: Chet Ramey <chet.ramey () case ! edu>
Date: 2015-12-20 2:12:15
Message-ID: 56760E7F.30504 () case ! edu
[Download RAW message or body]
On 11/10/15 3:36 AM, Grisha Levit wrote:
> Apologies if I'm missing something about the expected SIGINT behavior. I've read \
> through the previous SIGINT discussions but this still seems unexpected:
> $ declare -p BASH_ARGC BASH_ARGV BASH_SOURCE BASH_LINENO
> declare -a BASH_ARGC=()
> declare -a BASH_ARGV=()
> declare -a BASH_SOURCE=()
> declare -a BASH_LINENO=()
>
> $ source <(echo 'kill -INT $$')
>
> $ declare -p BASH_ARGC BASH_ARGV BASH_SOURCE BASH_LINENO
> declare -a BASH_ARGC=([0]="1")
> declare -a BASH_ARGV=([0]="/dev/fd/63")
> declare -a BASH_SOURCE=([0]="/dev/fd/63")
> declare -a BASH_LINENO=([0]="5")
>
> Additionally, FUNCNAME is not cleared in some cases:
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/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic