DragonFly BSD
DragonFly commits List (threaded) for 2011-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: Peter Avalos <pavalos@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 21 Aug 2011 16:32:25 -0700 (PDT)

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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]