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

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


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

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

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


-- 
DragonFly BSD source repository



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