fflush(stdout);
(void) fflush(stdout);
Job_CatchOutput (){    int           	  nfds;    struct timeval	  timeout;    fd_set           	  readfds;    register LstNode	  ln;    register Job   	  *job;#ifdef RMT_WILL_WATCH    int	    	  	  pnJobs;   	/* Previous nJobs */#endif    fflush(stdout);#ifdef RMT_WILL_WATCH    pnJobs = nJobs;    /*     * It is possible for us to be called with nJobs equal to 0. This happens     * if all the jobs finish and a job that is stopped cannot be run     * locally (eg if maxLocal is 0) and cannot be exported. The job will     * be placed back on the stoppedJobs queue, Job_Empty() will return false,     * Make_Run will call us again when there's nothing for which to wait.     * nJobs never changes, so we loop forever. Hence the check. It could     * be argued that we should sleep for a bit so as not to swamp the     * exportation system with requests. Perhaps we should.     *     * NOTE: IT IS THE RESPONSIBILITY OF Rmt_Wait TO CALL Job_CatchChildren     * IN A TIMELY FASHION TO CATCH ANY LOCALLY RUNNING JOBS THAT EXIT.     * It may use the variable nLocal to determine if it needs to call     * Job_CatchChildren (if nLocal is 0, there's nothing for which to     * wait...)     */    while (nJobs != 0 && pnJobs == nJobs) {	Rmt_Wait();    }#else    if (usePipes) {	readfds = outputs;	timeout.tv_sec = SEL_SEC;	timeout.tv_usec = SEL_USEC;	if ((nfds = select (FD_SETSIZE, &readfds, (fd_set *) 0, (fd_set *) 0, &timeout)) < 0)	{	    return;	} else {	    if (Lst_Open (jobs) == FAILURE) {		Punt ("Cannot open job table");	    }	    while (nfds && (ln = Lst_Next (jobs)) != NILLNODE) {		job = (Job *) Lst_Datum (ln);		if (FD_ISSET(job->inPipe, &readfds)) {		    JobDoOutput (job, FALSE);		    nfds -= 1;		}	    }	    Lst_Close (jobs);	}    }#endif /* RMT_WILL_WATCH */}