hush: make "exit" in trap use pre-trap exitcode
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 21 Feb 2020 01:18:06 +0000 (02:18 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 21 Feb 2020 01:18:06 +0000 (02:18 +0100)
commitcc9ecd9af13f04a4814ebdec60942962c3e9f14f
tree700e8aa0d2e23df90312d224f42a76733c9b248e
parentf977e004cefe46e8010c3d29681d77da50e380a9
hush: make "exit" in trap use pre-trap exitcode

function                                             old     new   delta
check_and_run_traps                                  259     276     +17
builtin_exit                                          42      53     +11
hush_main                                           1086    1096     +10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 38/0)               Total: 38 bytes

Fixes exitcode_trap2.tests.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/hush.c