From c4d3e851d9ba5c61d31fdc858c4639020d11d350 Mon Sep 17 00:00:00 2001 From: Siteshwar Vashisht Date: Mon, 14 Aug 2017 15:35:29 +0200 Subject: [PATCH] Fix condition to fork subshell Resolves: #1462347 --- ksh-20120801-subshell-jobwait.patch | 14 ++++++++++++++ ksh.spec | 9 ++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 ksh-20120801-subshell-jobwait.patch diff --git a/ksh-20120801-subshell-jobwait.patch b/ksh-20120801-subshell-jobwait.patch new file mode 100644 index 0000000..8dac4a1 --- /dev/null +++ b/ksh-20120801-subshell-jobwait.patch @@ -0,0 +1,14 @@ +diff --git a/src/cmd/ksh93/sh/xec.c b/src/cmd/ksh93/sh/xec.c +--- a/src/cmd/ksh93/sh/xec.c ++++ b/src/cmd/ksh93/sh/xec.c +@@ -1647,8 +1647,9 @@ int sh_exec(register const Shnode_t *t, int flags) + { + if (!unpipe) + unpipe = iousepipe(shp); +- sh_subfork(); + } ++ ++ sh_subfork(); + } + } + no_fork = !ntflag && !(type&(FAMP|FPOU)) && !shp->subshell && diff --git a/ksh.spec b/ksh.spec index fe74753..c75798b 100644 --- a/ksh.spec +++ b/ksh.spec @@ -8,7 +8,7 @@ URL: http://www.kornshell.com/ #CPL everywhere else (for KSH itself) License: CPL Version: %{releasedate} -Release: 39%{?dist} +Release: 40%{?dist} Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{release_date}.tgz Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{release_date}.tgz Source2: kshcomp.conf @@ -193,6 +193,9 @@ Patch79: ksh-20120801-glibc-build-fix.patch # rhbz#1459000 Patch80: ksh-20120801-jobwait-sigstop.patch +# rhbz#1462347 +Patch81: ksh-20120801-subshell-jobwait.patch + Conflicts: pdksh Requires: coreutils, diffutils, chkconfig BuildRequires: bison @@ -316,6 +319,10 @@ fi %config(noreplace) %{_sysconfdir}/binfmt.d/kshcomp.conf %changelog +* Mon Aug 14 2017 Siteshwar Vashisht - 20120801-40 +- Fix condition to fork subshell + Resolves: #1462347 + * Mon Aug 14 2017 Siteshwar Vashisht - 20120801-39 - Set terminal foreground process group while resuming process Resolves: #1459000