ksh/ksh-20120801-retfix.patch

15 lines
560 B
Diff
Raw Normal View History

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