This commit is contained in:
Michal Hlavinka 2014-06-10 09:24:46 +02:00
parent a06a40d167
commit 824ec64524
3 changed files with 38 additions and 15 deletions

View File

@ -1,12 +0,0 @@
diff -up ksh-20120801/src/cmd/ksh93/sh/xec.c.bigsubst ksh-20120801/src/cmd/ksh93/sh/xec.c
--- ksh-20120801/src/cmd/ksh93/sh/xec.c.bigsubst 2014-02-11 08:54:30.113556940 +0100
+++ ksh-20120801/src/cmd/ksh93/sh/xec.c 2014-02-11 08:54:30.141556816 +0100
@@ -1772,7 +1772,7 @@ int sh_exec(register const Shnode_t *t,
}
if(shp->pipepid)
shp->pipepid = parent;
- else
+ else if(shp->comsub!=1)
{
job_wait(parent);
if(parent==shp->spid)

View File

@ -0,0 +1,32 @@
diff -up ksh-20120801/src/cmd/ksh93/sh/xec.c.hokaido ksh-20120801/src/cmd/ksh93/sh/xec.c
--- ksh-20120801/src/cmd/ksh93/sh/xec.c.hokaido 2014-06-10 08:30:29.953485752 +0200
+++ ksh-20120801/src/cmd/ksh93/sh/xec.c 2014-06-10 09:22:32.646799331 +0200
@@ -1618,11 +1618,25 @@ int sh_exec(register const Shnode_t *t,
#endif /* SHOPT_COSHELL */
if(shp->subshell)
{
- sh_subtmpfile(shp);
+ if(shp->comsub==1)
+ {
+ int t=shp->comsub;
+ if(t==1)shp->comsub=2;
+ sh_subtmpfile(shp);
+ shp->comsub=t;
+ }
+ else
+ sh_subtmpfile(shp);
if(shp->comsub==1 && !(shp->fdstatus[1]&IONOSEEK))
- unpipe=iousepipe(shp);
+ unpipe = iousepipe(shp);
if((type&(FAMP|TFORK))==(FAMP|TFORK))
- sh_subfork();
+ {
+ if(shp->comsub && !(shp->fdstatus[1]&IONOSEEK))
+ {
+ if (!unpipe) unpipe = iousepipe(shp);
+ sh_subfork();
+ }
+ }
}
no_fork = !ntflag && !(type&(FAMP|FPOU)) && !shp->subshell &&
!(shp->st.trapcom[SIGINT] && *shp->st.trapcom[SIGINT]) &&

View File

@ -6,7 +6,7 @@ URL: http://www.kornshell.com/
Group: System Environment/Shells Group: System Environment/Shells
License: EPL License: EPL
Version: 20120801 Version: 20120801
Release: 17%{?dist} Release: 18%{?dist}
Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{releasedate}.tgz Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{releasedate}.tgz
Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{releasedate}.tgz Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{releasedate}.tgz
Source2: kshcomp.conf Source2: kshcomp.conf
@ -33,7 +33,7 @@ Patch12: ksh-20130628-longer.patch
# for ksh <= 2013-04-09, rhbz#960371 # for ksh <= 2013-04-09, rhbz#960371
Patch13: ksh-20120801-lexfix.patch Patch13: ksh-20120801-lexfix.patch
Patch14: ksh-20120801-bigsubst.patch Patch14: ksh-20120801-hokaido.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Conflicts: pdksh Conflicts: pdksh
@ -66,7 +66,7 @@ with "sh" (the Bourne Shell).
%patch11 -p1 -b .argvfix %patch11 -p1 -b .argvfix
%patch12 -p1 -b .longer %patch12 -p1 -b .longer
%patch13 -p1 -b .lexfix %patch13 -p1 -b .lexfix
%patch14 -p1 -b .bigsubst %patch14 -p1 -b .hokaido
#/dev/fd test does not work because of mock #/dev/fd test does not work because of mock
sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options
@ -161,6 +161,9 @@ fi
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Tue Jun 10 2014 Michal Hlavinka <mhlavink@redhat.com> - 20120801-18
- fix FTBFS(#1107070)
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20120801-17 * Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20120801-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild