git: sh: Fix some bugs with exit status from case containing ;&.
Peter Avalos
pavalos at crater.dragonflybsd.org
Sun Feb 5 13:05:29 PST 2012
commit b88d2fafe2e2a6d776e70cb6d6cca1533087b699
Author: Peter Avalos <pavalos at dragonflybsd.org>
Date: Sun Feb 5 12:04:53 2012 -0800
sh: Fix some bugs with exit status from case containing ;&.
Also, rework evalcase() to not evaluate any tree. Instead, return the
NCLISTFALLTHRU node and handle it in evaltree().
Fixed bugs:
* If a ;& list with non-zero exit status is followed by an empty ;; or final
list, the exit status of the case command should be equal to the exit
status of the ;& list, not 0.
* An empty ;& case should not reset $?.
Obtained-from: FreeBSD 230161
Summary of changes:
bin/sh/eval.c | 35 ++++++++++++++++++++--------
tools/regression/bin/sh/builtins/case17.0 | 3 ++
tools/regression/bin/sh/builtins/case18.0 | 7 +++++
tools/regression/bin/sh/builtins/case19.0 | 7 +++++
4 files changed, 42 insertions(+), 10 deletions(-)
create mode 100644 tools/regression/bin/sh/builtins/case17.0
create mode 100644 tools/regression/bin/sh/builtins/case18.0
create mode 100644 tools/regression/bin/sh/builtins/case19.0
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b88d2fafe2e2a6d776e70cb6d6cca1533087b699
--
DragonFly BSD source repository
More information about the Commits
mailing list