git: sh: Save/restore changed variables in optimized command sub

看板DFBSD_commit作者時間14年前 (2011/08/22 08:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 329310630e302987fe923eb19b075d3cdd16a9f6 Author: Peter Avalos <pavalos@dragonflybsd.org> Date: Sun Aug 21 13:54:19 2011 -0700 sh: Save/restore changed variables in optimized command substitution. In optimized command substitution, save and restore any variables changed by expansions (${var=value} and $((var=assigned))), instead of trying to determine if an expansion may cause such changes. If $! is referenced in optimized command substitution, do not cause jobs to be remembered longer. This fixes $(jobs $!) again, simplifies the man page and shortens the code. Obtained-from: FreeBSD 223024 Summary of changes: bin/sh/eval.c | 20 +++++++++------ bin/sh/expand.c | 74 +------------------------------------------------------ bin/sh/expand.h | 3 +- bin/sh/jobs.c | 6 +++- bin/sh/sh.1 | 7 +--- bin/sh/var.c | 12 ++++++--- bin/sh/var.h | 4 ++- 7 files changed, 31 insertions(+), 95 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/329310630e302987fe923eb19b075d3cdd16a9f6 -- DragonFly BSD source repository
文章代碼(AID): #1EKPnB6l (DFBSD_commit)