ksh/ksh-20100309-compsubst.patch
Michal Hlavinka 4e113465da - fix infinite loop when whence builtin is used with -q option (#587127)
- fix stdin for double command substitution (#584007)
2010-05-05 10:53:12 +00:00

12 lines
493 B
Diff

--- a/src/cmd/ksh93/sh/jobs.c 2010-03-10 23:57:41.000000000 +0530
+++ b/src/cmd/ksh93/sh/jobs.c 2010-04-20 18:12:15.000000000 +0530
@@ -1341,7 +1341,7 @@ int job_wait(register pid_t pid)
sfprintf(sfstderr,"ksh: job line %4d: wait pid=%d critical=%d flags=%o\n",__LINE__,getpid(),job.in_critical,pw->p_flag);
#endif /* DEBUG*/
errno = 0;
- if(sh.coutpipe>=0 && sh.cpid==lastpid)
+ if(sh.coutpipe>=0 && sh.cpid && sh.cpid==lastpid )
{
sh_close(sh.coutpipe);
sh_close(sh.cpipe[1]);