git: sh: Set $? to 0 for background commands.

看板DFBSD_commit作者時間14年前 (2011/08/22 08:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 5d4731c8351e78f0e4bf4cc5b6997b92110c3fbd Author: Peter Avalos <pavalos@dragonflybsd.org> Date: Sat Jul 2 13:59:09 2011 -1000 sh: Set $? to 0 for background commands. For backgrounded pipelines and subshells, the previous value of $? was being preserved, which is incorrect. For backgrounded simple commands containing a command substitution, the status of the last command substitution was returned instead of 0. If fork() fails, this is an error. Obtained-from: FreeBSD SVN rev 221027 Summary of changes: bin/sh/eval.c | 11 +++++++---- tools/regression/bin/sh/execution/bg1.0 | 3 +++ tools/regression/bin/sh/execution/bg2.0 | 5 +++++ tools/regression/bin/sh/execution/bg3.0 | 5 +++++ 4 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 tools/regression/bin/sh/execution/bg1.0 create mode 100644 tools/regression/bin/sh/execution/bg2.0 create mode 100644 tools/regression/bin/sh/execution/bg3.0 http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5d4731c8351e78f0e4bf4cc5b6997b92110c3fbd -- DragonFly BSD source repository
文章代碼(AID): #1EKPnCDZ (DFBSD_commit)