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

git: sh: Fix two bugs with case and exit status:


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

commit c79cd3b3a40bbcea12f869fee83c021fc6c8bf90
Author: Peter Avalos <pavalos@dragonflybsd.org>
Date:   Sun Feb 5 12:02:44 2012 -0800

    sh: Fix two bugs with case and exit status:
    
    * If no pattern is matched, POSIX says the exit status shall be 0 (even if
      there are command substitutions).
    * If a pattern is matched and there are no command substitutions, the first
      command should see the $? from before the case command, not always 0.
    
    Obtained-from:  FreeBSD 230154

Summary of changes:
 bin/sh/eval.c                             |    6 ++++--
 tools/regression/bin/sh/builtins/case14.0 |    5 +++++
 tools/regression/bin/sh/builtins/case15.0 |    5 +++++
 tools/regression/bin/sh/builtins/case16.0 |    7 +++++++
 4 files changed, 21 insertions(+), 2 deletions(-)
 create mode 100644 tools/regression/bin/sh/builtins/case14.0
 create mode 100644 tools/regression/bin/sh/builtins/case15.0
 create mode 100644 tools/regression/bin/sh/builtins/case16.0

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


-- 
DragonFly BSD source repository



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