git: sh: Fix $? in the first command of a 'for'.
Peter Avalos
pavalos at crater.dragonflybsd.org
Sun Feb 5 13:05:30 PST 2012
commit 723ecb596978d3ed4d37a449ce636a35c743ec80
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
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
More information about the Commits
mailing list