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

git: sh: Fix $? in the first command of a 'for'.


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

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

    sh: Fix $? in the first command of a 'for'.
    
    In the first command of a 'for', $? should be the exit status of the last
    pipeline (command substitution in the word list or command before 'for'),
    not always 0.
    
    Obtained-from:  FreeBSD 230463

Summary of changes:
 bin/sh/eval.c                           |    7 +++++--
 tools/regression/bin/sh/builtins/for2.0 |    9 +++++++++
 tools/regression/bin/sh/builtins/for3.0 |    8 ++++++++
 3 files changed, 22 insertions(+), 2 deletions(-)
 create mode 100644 tools/regression/bin/sh/builtins/for2.0
 create mode 100644 tools/regression/bin/sh/builtins/for3.0

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/723ecb596978d3ed4d37a449ce636a35c743ec80


-- 
DragonFly BSD source repository



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