bug in ash set -e

Denys Vlasenko vda.linux at googlemail.com
Fri Nov 11 14:38:54 UTC 2016


On Wed, Nov 9, 2016 at 6:52 PM, Natanael Copa <ncopa at alpinelinux.org> wrote:
> On Wed, 09 Nov 2016 16:12:41 +0000
> Ron Yorston <rmy at pobox.com> wrote:
>
>> Natanael Copa wrote:
>> >I have found a bug (or weird feature?) in busybox ash:
>> >
>> >$ dash -c "set -e ; ( false ) ; echo 'should not echo'"
>> >$ bash -c "set -e ; ( false ) ; echo 'should not echo'"
>> >$ ash -c "set -e ; ( false ) ; echo 'should not echo'"
>> >should not echo
>> >$
>> >
>> >It looks like `set -e` does not catch error in ( )
>>
>> This is true in 1.25.1.  It's fixed in master by this:
>>
>> commit 204c7fb2293f67f6277f917e854188f5540e6955
>> Author: Rostislav Skudnov <rostislav at tuxera.com>
>> Date:   Fri Sep 16 19:04:02 2016 +0000
>>
>>     ash: exit after subshell error when errexit option is set
>>
>>     When "set -e" option is on, shell must exit when any command fails,
>>     including compound commands of the form (compound-list) executed in a
>>     subshell. Bash and dash shells have this behaviour.
>>
>>     Also add a corresponding testcase.
>>
>> Ron
>
> So it should be added to fixes-1.25.1/ and inclueded in 1.25.2

I plan to release 1.26.0 before New Year. Can do it sooner.


More information about the busybox mailing list