Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables uname output: Linux abac.awanti.com 2.6.22.9-61.fc6 #1 SMP Thu Sep 27 18:48:03 EDT 2007 i686 i686 i386 GNU/Linux Machine Type: i686-redhat-linux-gnu
Bash Version: 3.1 Patch Level: 17 Release Status: release Description: Failed trap ERR inside function. Below is an example of script(see comments): #!/bin/bash -E err_print() { RETVAL=$? echo "Nonzero exit: $RETVAL" echo "file: ${BASH_SOURCE[0]}" echo "line: ${BASH_LINENO[0]}" } trap err_print ERR failed_func(){ # false must be ignored becose && # but ... false && echo "" } # false must be ignored becose && false && echo "" failed_func Regards, Evgeny Shkrigunov