git: sh: Save/restore changed variables in optimized command substitution.

Peter Avalos pavalos at crater.dragonflybsd.org
Sun Aug 21 16:33:37 PDT 2011


commit 329310630e302987fe923eb19b075d3cdd16a9f6
Author: Peter Avalos <pavalos at 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





More information about the Commits mailing list