Dr. Werner Fink 2013-11-20 14:28:55 +00:00 committed by Git OBS Bridge
parent ec4f200579
commit d8d594c0ac
2 changed files with 20 additions and 4 deletions

View File

@ -552,6 +552,7 @@ fi
test "$result" = xy || exit 1
result=$(${SHELL} -c 'echo | echo "x$(/bin/echo y)"')
test "$result" = xy || exit 1
${SHELL} -c 'trap "exit 0" EXIT; typeset -T X=(typeset x; function x.get { :; }); X -a xs=((x=yo) (x=jo))'
exec 3> ${TMPDIR:-/tmp}/log
LANG=POSIX
strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:10} 400

View File

@ -1565,7 +1565,22 @@
}
}
return(parent);
@@ -3479,8 +3524,7 @@ static void sh_funct(Shell_t *shp,Namval
@@ -3420,7 +3469,13 @@ int sh_funscope(int argn, char *argv[],i
if(np && (nq=*nref++))
{
np->nvalue.nrp = newof(0,struct Namref,1,0);
- np->nvalue.nrp->np = nq;
+ if(nv_isattr(nq,NV_LDOUBLE)==NV_LDOUBLE)
+ np->nvalue.nrp->np = nq;
+ else
+ {
+ np->nvalue.nrp->np = (Namval_t*)pointerof((Sflong_t)(*nq->nvalue.ldp));
+ nv_onattr(nq,NV_LDOUBLE);
+ }
nv_onattr(np,NV_REF|NV_NOFREE);
}
}
@@ -3479,8 +3530,7 @@ static void sh_funct(Shell_t *shp,Namval
struct funenv fun;
char *fname = nv_getval(SH_FUNNAMENOD);
struct Level *lp =(struct Level*)(SH_LEVELNOD->nvfun);
@ -1583,7 +1598,7 @@
#if 0
nv_putval(SH_FUNNAMENOD,shp->st.funname,NV_NOFREE);
#else
@@ -3628,11 +3671,11 @@ static void coproc_init(Shell_t *shp, in
@@ -3628,11 +3677,11 @@ static void coproc_init(Shell_t *shp, in
sh_pipe(shp->cpipe);
if((outfd=shp->cpipe[1]) < 10)
{
@ -1597,7 +1612,7 @@
shp->fdstatus[outfd] = IOCLOSE;
shp->cpipe[1] = fd;
}
@@ -3721,7 +3764,7 @@ static int run_subshell(Shell_t *shp,con
@@ -3721,7 +3770,7 @@ static int run_subshell(Shell_t *shp,con
if(!shp->gd->shpath)
shp->gd->shpath = pathshell();
pid = spawnveg(shp->shpath,arglist,envlist,grp);
@ -1606,7 +1621,7 @@
for(i=3; i < 10; i++)
{
if(shp->fdstatus[i]&IOCLEX && i!=pin && i!=pout)
@@ -4002,7 +4045,7 @@ static pid_t sh_ntfork(Shell_t *shp,cons
@@ -4002,7 +4051,7 @@ static pid_t sh_ntfork(Shell_t *shp,cons
shp->gd->shpath = pathshell();
spawnpid = path_spawn(shp,shp->gd->shpath,&argv[-1],arge,pp,(grp<<1)|1);
if(fd>=0)