summaryrefslogtreecommitdiffstats
path: root/source/ap/ksh93/patches/ksh-20120801-retfix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/ksh93/patches/ksh-20120801-retfix.patch')
-rw-r--r--source/ap/ksh93/patches/ksh-20120801-retfix.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/ap/ksh93/patches/ksh-20120801-retfix.patch b/source/ap/ksh93/patches/ksh-20120801-retfix.patch
new file mode 100644
index 000000000..bcb5b3326
--- /dev/null
+++ b/source/ap/ksh93/patches/ksh-20120801-retfix.patch
@@ -0,0 +1,20 @@
+diff -up ksh-20120801/src/cmd/ksh93/sh/subshell.c.retfix ksh-20120801/src/cmd/ksh93/sh/subshell.c
+--- ksh-20120801/src/cmd/ksh93/sh/subshell.c.retfix 2014-09-01 13:50:02.956085721 +0200
++++ ksh-20120801/src/cmd/ksh93/sh/subshell.c 2014-09-01 13:54:01.104818416 +0200
+@@ -652,6 +652,16 @@ Sfio_t *sh_subshell(Shell_t *shp,Shnode_
+ }
+ else
+ {
++ if(comsub!=1 && shp->spid)
++ {
++ int c = shp->exitval;
++ job_wait(shp->spid);
++ shp->exitval = c;
++ exitset();
++ if(shp->pipepid==shp->spid)
++ shp->spid = 0;
++ shp->pipepid = 0;
++ }
+ job.hack1_waitall=0;
+ /* move tmp file to iop and restore sfstdout */
+ iop = sfswap(sfstdout,NIL(Sfio_t*));