git: DragonFly_RELEASE_3_0 sh: Fix execution of multiple statements in a trap when evalskip is set

Peter Avalos pavalos at crater.dragonflybsd.org
Sun Feb 5 13:05:22 PST 2012


commit b10eb092c3f3d21c311ae15513e9a4b7db195c90
Author: Peter Avalos <pavalos at dragonflybsd.org>
Date:   Sun Feb 5 12:07:56 2012 -0800

    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
    (cherry picked from commit a1cf61ab1fd76b3e90e17fc4bc03767015deb2e1)

Summary of changes:
 bin/sh/eval.c                             |    4 +-
 bin/sh/eval.h                             |    3 +-
 bin/sh/trap.c                             |   35 +++++++++++++++++++++++++++-
 tools/regression/bin/sh/builtins/trap10.0 |    6 +++++
 tools/regression/bin/sh/builtins/trap11.0 |    8 ++++++
 5 files changed, 51 insertions(+), 5 deletions(-)
 create mode 100644 tools/regression/bin/sh/builtins/trap10.0
 create mode 100644 tools/regression/bin/sh/builtins/trap11.0

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b10eb092c3f3d21c311ae15513e9a4b7db195c90


-- 
DragonFly BSD source repository





More information about the Commits mailing list