Dr. Werner Fink 2011-06-14 12:00:11 +00:00 committed by Git OBS Bridge
parent 9b95f29bf2
commit d0dcc5884d
5 changed files with 51 additions and 3 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jun 14 11:36:28 UTC 2011 - werner@suse.de
- Fix off by one error which should make timetype.sh work now
- Update the array fix as well as the pipe fix
-------------------------------------------------------------------
Fri Jun 10 19:11:07 CEST 2011 - werner@suse.de

View File

@ -76,6 +76,7 @@ Patch21: ksh93-export.dif
Patch22: ksh93-eintr.dif
Patch23: ksh93-array.dif
Patch24: ksh93-pipe.dif
Patch25: ksh93-argv.dif
%global use_suid_exe 0
%global use_locale 1
%global debug_memleak 0
@ -151,6 +152,7 @@ find share/ -type d -a -empty | xargs -r rm -vrf
%patch22
%patch23
%patch24
%patch25
%build
TMPDIR=$(mktemp -d /tmp/ksh-build.XXXXXX) || exit 1

20
ksh93-argv.dif Normal file
View File

@ -0,0 +1,20 @@
--- src/cmd/ksh93/sh/xec.c
+++ src/cmd/ksh93/sh/xec.c 2011-06-14 13:31:32.471925963 +0200
@@ -2914,7 +2914,7 @@ int sh_fun(Namval_t *np, Namval_t *nq, c
long mode;
char *prefix = shp->prefix;
int n=0;
- char *av[2];
+ char *av[3];
Fcin_t save;
fcsave(&save);
if((offset=staktell())>0)
@@ -2922,7 +2922,7 @@ int sh_fun(Namval_t *np, Namval_t *nq, c
shp->prefix = 0;
if(!argv)
{
- argv = av;
+ argv = av+1;
argv[1]=0;
}
argv[0] = nv_name(np);

View File

@ -49,3 +49,14 @@
{
if((ap->header.nelem&ARRAY_NOCHILD) && nv_isattr(ap->cur,NV_CHILD))
continue;
--- src/cmd/ksh93/sh/xec.c
+++ src/cmd/ksh93/sh/xec.c 2011-06-14 13:31:32.471925963 +0200
@@ -680,7 +680,7 @@ static int set_instance(Shell_t *shp,Nam
char *sp=0,*cp;
Namarr_t *ap;
Namval_t *np;
- if(!nv_isattr(nq,NV_MINIMAL|NV_EXPORT) && (np=(Namval_t*)nq->nvenv) && nv_isarray(np))
+ if(!nv_isattr(nq,NV_MINIMAL|NV_EXPORT|NV_ARRAY) && (np=(Namval_t*)nq->nvenv) && nv_isarray(np))
nq = np;
cp = nv_name(nq);
memset(nr,0,sizeof(*nr));

View File

@ -132,7 +132,16 @@
sh_redirect(shp,t->fork.forkio,execflg);
(t->fork.forktre)->tre.tretyp |= t->tre.tretyp&FSHOWME;
sh_exec(t->fork.forktre,flags&~simple);
@@ -1580,14 +1596,22 @@ int sh_exec(register const Shnode_t *t,
@@ -1523,6 +1539,8 @@ int sh_exec(register const Shnode_t *t,
if(type || !sh_isoption(SH_PIPEFAIL))
shp->exitval = type;
}
+ if(shp->comsub==1 && subpipe[0]>=0)
+ iounpipe(shp);
shp->pipepid = 0;
shp->st.ioset = 0;
if(simple && was_errexit)
@@ -1580,14 +1598,22 @@ int sh_exec(register const Shnode_t *t,
* All elements of the pipe are started by the parent.
* The last element executes in current environment
*/
@ -157,7 +166,7 @@
shp->inpipe = pvo;
shp->outpipe = pvn;
pvo[1] = -1;
@@ -2543,7 +2567,10 @@ pid_t _sh_fork(register pid_t parent,int
@@ -2543,7 +2569,10 @@ pid_t _sh_fork(register pid_t parent,int
if(jobid)
*jobid = myjob;
if(shp->comsub==1 && subpipe[0]>=0)
@ -169,7 +178,7 @@
return(parent);
}
#if !_std_malloc
@@ -2602,6 +2629,7 @@ pid_t _sh_fork(register pid_t parent,int
@@ -2602,6 +2631,7 @@ pid_t _sh_fork(register pid_t parent,int
if(sig>0)
sh_fault(sig);
sh_sigcheck();