Anomaly

2016-09-21 Thread PePa
When sourcing this script (version 1), it will print y after receiving an interrupt, but not in the 2 different versions (2 and 3). # version 1 echo x sleep 99 echo y # version 2 echo x; sleep 99 echo y # version 3 echo x sleep 99; echo y Is this a bug or expected behaviour?? Thanks for your at

[BUG] incorrect exit status from subshell on bash with --enable-minimal-config

2016-09-21 Thread Martijn Dekker
On bash with --enable-minimal-config, as of version 4.3 (as far as I can tell), there appears to be a bug with the exit status on returning from subshells. Apparently the exit status of the subshell is not given to the main shell. On bash-4.4 with --enable-minimal-config: $ (false);echo $? 0 $ (fa

Execution of a data string

2016-09-21 Thread mobatu...@yahoo.ca
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPA$

Re: [BUG] incorrect exit status from subshell on bash with --enable-minimal-config

2016-09-21 Thread Martijn Dekker
Op 22-09-16 om 00:06 schreef Martijn Dekker: > On bash-4.4 with --enable-minimal-config: > $ (false);echo $? > 0 > $ (false);echo $? > 0 > $ (false);echo $? > 0 Another clue to the nature of the bug: it apparently happens before exiting the subshell. $ (false && echo true || echo false) true $ fa