bug-bash
[Top][All Lists]
Advanced

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

-e doesn't work in subshells


From: allbery
Subject: -e doesn't work in subshells
Date: Fri, 19 Jan 2001 21:29:31 -0500

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' 
-DCONF_OSTYPE='linux' -DCONF_MACHTYPE='i386-suse-linux' -DCONF_VENDOR='suse' 
-DSHELL -DHAVE_CONFIG_H  -D_FILE_OFFSET_BITS=64  -I. -I/usr/include -I. 
-I./include -I./lib -I/usr/include -O2 -m486 -D_GNU_SOURCE -Wall -pipe
uname output: Linux tully 2.2.16 #1 Wed Aug 2 20:02:13 GMT 2000 i686 unknown
Machine Type: i386-suse-linux

Bash Version: 2.04
Patch Level: 0
Release Status: release

Description:
        "set -e" does not abort the entire script when used inside a
        parenthesized subshell; it only aborts the subshell.

Repeat-By:
        trap 'echo Congratulations, your shell is not buggy' 0
        set -e
        (false; echo you will not see this)
        trap 0
        echo You have the bash -e bug.
        exit 1

    Output with bash:
        You have the bash -e bug.

    Output with other shells (pdksh, zsh, Solaris /sbin/sh and ksh, AIX sh,
                              bsh, and ksh, DU sh and ksh):
        Congratulations, your shell is not buggy



reply via email to

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