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

Peter Avalos pavalos at crater.dragonflybsd.org
Sun Feb 5 13:05:23 PST 2012


commit ec14fc0d690f3ce6866e8732bb64ff6e3758a447
Author: Peter Avalos <pavalos at 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
    (cherry picked from commit 723ecb596978d3ed4d37a449ce636a35c743ec80)

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


-- 
DragonFly BSD source repository





More information about the Commits mailing list