bug-bash
[Top][All Lists]
Advanced

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

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


From: Martijn Dekker
Subject: [BUG] incorrect exit status from subshell on bash with --enable-minimal-config
Date: Thu, 22 Sep 2016 00:06:55 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

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
$ (false);echo $?
0
$ (false);echo $?
0

On bash-4.4 with --enable-minimal-config --enable-alias:
$ (false);echo $?
1
$ (false);echo $?
0
$ (false);echo $?
0

Note the difference in behaviour: if --enable-alias is used it acts
correctly but only once.

On bash-4.3 the behaviour is identical. bash-4.2 doesn't compile on my
system so I was unable to test it. On bash-4.1 and bash-4.0 the bug is
not present. Testing was done on Mac OS X 10.11.6.

Thanks,

- Martijn



reply via email to

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