[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

backquotes inconsistent with errexit (set -e) and export

From: Hans Ecke
Subject: backquotes inconsistent with errexit (set -e) and export
Date: Wed, 23 Jun 2004 18:18:54 -0600

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: i386-redhat-linux-gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu' 
-DCONF_VENDOR='redhat' -DSHELL -DHAVE_CONFIG_H  -I.  -I. -I./include -I./lib 
-D_FILE_OFFSET_BITS=64 -O2 -g -pipe -march=i386 -mcpu=i686
uname output: Linux sonduk.mines.edu 2.6.7-1.437custom #2 Thu Jun 17 18:16:34 
MDT 2004 i686 i686 i386 GNU/Linux
Machine Type: i386-redhat-linux-gnu

Bash Version: 2.05b
Patch Level: 0
Release Status: release

        I use "set -e" a lot in scripts to increase brittleness. The main 
feature is that if 
        childprocesses return an error than the script stops and exits itself 
with an error.

           set -e;VVV=`false`
        will stop any script.

        However, using the 'export' builtin will disable this behavior:
           set -e;export VVV=`false`
        will not stop the script.

       set -e;export VVV=`false`
       This fragment should stop any shell script, but it does not.

       Make 'set -e' consistent: an error inside backquotes should propagate 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]