Blame SOURCES/ksh-20120801-retfix.patch

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