components/ksh93/patches/205-17851169.patch
changeset 4305 90493abe0c5c
parent 4268 d723f8ed85fe
child 5129 5431772f7235
--- a/components/ksh93/patches/205-17851169.patch	Mon May 18 13:04:23 2015 -0700
+++ b/components/ksh93/patches/205-17851169.patch	Mon May 18 14:11:16 2015 -0700
@@ -1,9 +1,8 @@
-#	This has been submitted to the community but has not been accepted yet.
-#	The details can be found at the following location.
-#	http://lists.research.att.com/pipermail/ast-developers/2014q1/003809.html
---- INIT.2012-08-01.old/src/cmd/ksh93/sh/subshell.c	2015-02-24 13:25:19.363479570 -0800
-+++ INIT.2012-08-01/src/cmd/ksh93/sh/subshell.c	2015-03-05 13:02:10.389323525 -0800
-@@ -242,15 +244,22 @@ Namval_t *sh_assignok(register Namval_t
+http://lists.research.att.com/pipermail/ast-developers/2014q1/003809.html
+---
+--- a/src/cmd/ksh93/sh/subshell.c
++++ b/src/cmd/ksh93/sh/subshell.c
+@@ -234,15 +234,22 @@ Namval_t *sh_assignok(register Namval_t *np,int add)
  {
  	register Namval_t	*mp;
  	register struct Link	*lp;
@@ -17,7 +16,7 @@
  	Namarr_t		*ap;
  	int			save;
 +
-+	sp = (struct subshell*)subshell_data;
++        sp = (struct subshell*)subshell_data;
 +
  	/* don't bother with this */
 -	if(!sp->shpwd || np==SH_LEVELNOD || np==L_ARGNOD || np==SH_SUBSCRNOD || np==SH_NAMENOD)
@@ -27,6 +26,7 @@
 +	shp = sp->shp;
 +	dp = shp->var_tree;
 +
- 	/* don't bother to save if in newer scope */
- 	if(sp->var!=shp->var_tree && sp->var!=shp->var_base && shp->last_root==shp->var_tree)
- 		return(np);
+ 	if((ap=nv_arrayptr(np)) && (mp=nv_opensub(np)))
+ 	{
+ 		shp->last_root = ap->table;
+