DragonFly BSD
DragonFly commits List (threaded) for 2012-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: Peter Avalos <pavalos@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 5 Feb 2012 13:05:29 -0800 (PST)

commit a1cf61ab1fd76b3e90e17fc4bc03767015deb2e1
Author: Peter Avalos <pavalos@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

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/a1cf61ab1fd76b3e90e17fc4bc03767015deb2e1


-- 
DragonFly BSD source repository



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