Path: utzoo!dciem!nrcaer!scs!spl1!laidbak!att!mtunx!rutgers!aramis.rutgers.edu!athos.rutgers.edu!hedrick From: hedrick@athos.rutgers.edu (Charles Hedrick) Newsgroups: comp.unix.microport Subject: modified fix to ksh Message-ID: Date: 5 Jun 88 04:54:14 GMT Article-I.D.: athos.Jun.5.00.54.13.1988.7153 Organization: Rutgers Univ., New Brunswick, N.J. Lines: 22 Cc: ulysses!dgk 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 */