modified fix to ksh

Charles Hedrick hedrick at athos.rutgers.edu
Sun Jun 5 14:54:14 AEST 1988


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 */



More information about the Comp.unix.microport mailing list