sh: Fix execution of multiple statements in a trap when evalskip is set
authorPeter Avalos <pavalos@dragonflybsd.org>
Sun, 5 Feb 2012 20:07:56 +0000 (12:07 -0800)
committerPeter Avalos <pavalos@dragonflybsd.org>
Sun, 5 Feb 2012 20:48:22 +0000 (12:48 -0800)
commita1cf61ab1fd76b3e90e17fc4bc03767015deb2e1
tree2d67d36a754e5483258873a700e2fe1a824a1bc4
parentb88d2fafe2e2a6d776e70cb6d6cca1533087b699
sh: Fix execution of multiple statements in a trap when evalskip is set

Before this fix, only the first statement of the trap was executed if
evalskip was set. This is for example the case when:
    o  "-e" is set for this shell
    o  a trap is set on EXIT
    o  a function returns 1 and causes the script to abort

Obtained-from:  FreeBSD 230212
bin/sh/eval.c
bin/sh/eval.h
bin/sh/trap.c
tools/regression/bin/sh/builtins/trap10.0 [new file with mode: 0644]
tools/regression/bin/sh/builtins/trap11.0 [new file with mode: 0644]