Blame SOURCES/ksh-20120801-retfix.patch

5a79ad
diff -up ksh-20120801/src/cmd/ksh93/sh/subshell.c.retfix ksh-20120801/src/cmd/ksh93/sh/subshell.c
5a79ad
--- ksh-20120801/src/cmd/ksh93/sh/subshell.c.retfix	2014-10-01 17:34:47.720532950 +0200
5a79ad
+++ ksh-20120801/src/cmd/ksh93/sh/subshell.c	2014-10-01 17:35:25.850350378 +0200
5a79ad
@@ -655,7 +655,10 @@ Sfio_t *sh_subshell(Shell_t *shp,Shnode_
5a79ad
 			job.hack1_waitall=0;
5a79ad
 			if(comsub!=1 && shp->spid)
5a79ad
 			{
5a79ad
+				int c = shp->exitval;
5a79ad
 				job_wait(shp->spid);
5a79ad
+				shp->exitval = c;
5a79ad
+				exitset();
5a79ad
 				if(shp->pipepid==shp->spid)
5a79ad
 					shp->spid = 0;
5a79ad
 				shp->pipepid = 0;