Hello community, here is the log from the commit of package ksh for openSUSE:Factory checked in at Mon May 16 10:28:37 CEST 2011.
-------- --- ksh/ksh.changes 2011-03-04 16:42:44.000000000 +0100 +++ /mounts/work_src_done/STABLE/ksh/ksh.changes 2011-05-13 17:47:14.000000000 +0200 @@ -1,0 +2,6 @@ +Fri May 13 15:29:04 UTC 2011 - [email protected] + +- Add workaround to enforce synchronization on here documents done + for forked sub shell or processes (bnc#690623) + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- ksh93-eintr.dif ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ksh.spec ++++++ --- /var/tmp/diff_new_pack.vplzoz/_old 2011-05-16 10:24:21.000000000 +0200 +++ /var/tmp/diff_new_pack.vplzoz/_new 2011-05-16 10:24:21.000000000 +0200 @@ -37,7 +37,7 @@ %endif AutoReqProv: on Version: 93t -Release: 190 +Release: 192 Summary: Korn Shell BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: INIT.2010-06-21.tar.bz2 @@ -73,6 +73,7 @@ Patch19: ksh93-fdleak.dif Patch20: ksh93-argv0.dif Patch21: ksh93-export.dif +Patch22: ksh93-eintr.dif %global use_suid_exe 0 %global use_locale 1 %global debug_memleak 0 @@ -145,6 +146,7 @@ %patch19 %patch20 %patch21 +%patch22 %build typeset -i IGNORED=0x$(ps --no-headers -o ignored $$) ++++++ ksh93-eintr.dif ++++++ --- src/cmd/ksh93/sh/io.c +++ src/cmd/ksh93/sh/io.c 2011-05-03 15:15:18.283926707 +0200 @@ -403,6 +403,7 @@ shp->sftable[2] = sfstderr; sfnotify(sftrack); sh_iostream(shp,0); + sh_iostream(shp,1); /* all write steams are in the same pool and share outbuff */ shp->outpool = sfopen(NIL(Sfio_t*),NIL(char*),"sw"); /* pool identifier */ shp->outbuff = (char*)malloc(IOBSIZE+4); @@ -608,7 +609,8 @@ } if(sp) shp->sftable[f1] = 0; - sh_close(f1); + if(shp->fdstatus[f1]!=IOCLOSE) + sh_close(f1); } return(f2); } @@ -1022,6 +1024,8 @@ memset(ap, 0, ARGVAL); if(iof&IOPUT) ap->argflag = ARG_RAW; + else if(shp->subshell) + sh_subtmpfile(shp); ap->argchn.ap = (struct argnod*)fname; ap = sh_argprocsub(shp,ap); fname = ap->argval; @@ -2148,13 +2152,18 @@ static ssize_t subread(Sfio_t* sp,void* buff,register size_t size,Sfdisc_t* handle) { register struct subfile *disp = (struct subfile*)handle; + ssize_t n; NOT_USED(sp); + sfseek(disp->oldsp,disp->offset,SEEK_SET); if(disp->left == 0) return(0); if(size > disp->left) size = disp->left; disp->left -= size; - return(sfread(disp->oldsp,buff,size)); + n = sfread(disp->oldsp,buff,size); + if(size>0) + disp->offset += size; + return(n); } /* --- src/cmd/ksh93/sh/subshell.c +++ src/cmd/ksh93/sh/subshell.c 2011-04-29 15:34:13.747926082 +0200 @@ -235,7 +235,7 @@ if(!sp->shpwd || np==SH_LEVELNOD || np==L_ARGNOD || np==SH_SUBSCRNOD || np==SH_NAMENOD) return(np); /* 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) + if(sp->var!=shp->var_tree && shp->last_root==shp->var_tree) return(np); if((ap=nv_arrayptr(np)) && (mp=nv_opensub(np))) { --- src/cmd/ksh93/sh/xec.c +++ src/cmd/ksh93/sh/xec.c 2011-05-03 15:02:23.411926136 +0200 @@ -53,6 +53,7 @@ #define SH_NTFORK SH_TIMING #define NV_BLTPFSH NV_ARRAY +#define HERE_MEM 0x1000 #if _lib_nice extern int nice(int); @@ -2606,6 +2607,7 @@ pid_t sh_fork(int flags, int *jobid) { + Sfio_t* aux_heredocs = NIL(Sfio_t*); register pid_t parent; register int sig; #if SHOPT_FASTPIPE @@ -2625,7 +2627,23 @@ sh.trapnote &= ~SH_SIGTERM; job_fork(-1); sh.savesig = -1; + if (sh.heredocs) + { + aux_heredocs = sftmp(HERE_MEM); + if (aux_heredocs) + { + sfseek(sh.heredocs,(off_t)0,SEEK_SET); + sfmove(sh.heredocs,aux_heredocs,(Sfoff_t)(-1),-1); + sfsync(aux_heredocs); + } + } while(_sh_fork(parent=fork(),flags,jobid) < 0); + if (aux_heredocs) + { + if (!parent) + sfswap(aux_heredocs,sh.heredocs); + sfclose(aux_heredocs); + } sh_stats(STAT_FORKS); sig = sh.savesig; sh.savesig = 0; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
