[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
declare overrides errexit
From: |
Sascha Ziemann |
Subject: |
declare overrides errexit |
Date: |
Thu, 23 Sep 2010 11:09:54 +0200 |
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-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/home/users/ziemann/share/locale'
-DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include
-I./lib -g -O2
uname output: Linux t4mshpapl104.dcn.detemobil.de
2.6.18-194.8.1.el5PAE #1 SMP Wed Jun 23 11:16:22 EDT 2010 i686 i686
i386 GNU/Linux
Machine Type: i686-pc-linux-gnu
Bash Version: 4.1
Patch Level: 0
Release Status: release
Description:
The errexit option does not work, if an error occures in a declare
statement.
Repeat-By:
The following code prints "a". The second false terminates the script
but the first does not.
set -e
declare a="a"$(false)
echo $a
b="b"$(false)
echo $b
- declare overrides errexit,
Sascha Ziemann <=