"type" may return incorrect information after posix mode is enabled

2015-07-21 Thread Stephane Chazelas
With the current git head (and 4.3): $ ./bash -c 'eval() { echo function; }; set -o posix; type eval; eval echo not function' eval is a function eval () { echo function } not function $ ./bash --version GNU bash, version 4.4.0(1)-alpha (x86_64-unknown-linux-gnu) [...] "type eval" should retu

Re: "type" may return incorrect information after posix mode is enabled

2015-07-21 Thread Eric Blake
On 07/21/2015 05:07 AM, Stephane Chazelas wrote: > With the current git head (and 4.3): > > $ ./bash -c 'eval() { echo function; }; set -o posix; type eval; eval echo > not function' 'eval' is a special built-in, and as such, cannot be usefully defined as a function, because the shell rules for

Re: "type" may return incorrect information after posix mode is enabled

2015-07-21 Thread Stephane Chazelas
2015-07-21 08:07:15 -0600, Eric Blake: > On 07/21/2015 05:07 AM, Stephane Chazelas wrote: > > With the current git head (and 4.3): > > > > $ ./bash -c 'eval() { echo function; }; set -o posix; type eval; eval echo > > not function' > > 'eval' is a special built-in, and as such, cannot be usefull

RE: "type" may return incorrect information after posix mode is enabled

2015-07-21 Thread Le Manh Cuong
Bash will report error if you define function, which named the same as special builtin commands, in POSIX mode: $ bash --norc --posix$ bash-4.3$ eval() { echo func;}bash: `eval': is a special builtin The problem here is bash doesn't forget those type of functions if they were defined before POSI

Re: Bug where SIGINT trap handler isn't called

2015-07-21 Thread Chet Ramey
On 7/16/15 12:05 AM, Patrick Plagwitz wrote: >> This is another case of the scenario most recently described in >> >> http://lists.gnu.org/archive/html/bug-bash/2014-03/msg00108.html >> >> In this case, python appears to catch the SIGINT (it looks like a >> KeyboardInterrupt exception), print the