hedrick@athos.rutgers.edu (Charles Hedrick) (06/05/88)
One of the patches that I reported to ksh yesterday had an unintended sideeffect. It was the one to xec.c to make pipelines work correctly when job control is in effect. Here's a better version. Search for TFORK: to find where this should go. (The version yesterday fixed pipelines that involve only normal programs. However those involving builtin commands failed. E.g. "history | more". The following code seems to work in all cases, though I think I may still be fixing a symptom rather than the disease.) case TFORK: { int no_fork; sync_io(); #ifdef SXT if(jobstat.j_flag==0) jobstat.cur_job = next_job(); /* find job number and create synchronization pipe */ if(jobstat.cur_job < jobstat.maxjob) if(pipe(jobstat.pipe)<0) jobstat.maxjob = 0; #endif /* SXT */