jobFull = TRUE;
jobFull = true;
JobRestart(job)    Job 	  *job; 	/* Job to restart */{#ifdef REMOTE    int host;#endif    if (job->flags & JOB_REMIGRATE) {	if (#ifdef REMOTE	    verboseRemigrates ||#endif	    DEBUG(JOB)) {	   (void)fprintf(stdout, "*** remigrating %x(%s)\n",			   job->pid, job->node->name);	   (void)fflush(stdout);	}#ifdef REMOTE	if (!Rmt_ReExport(job->pid, job->node, &host)) {	    if (verboseRemigrates || DEBUG(JOB)) {		(void)fprintf(stdout, "*** couldn't migrate...\n");		(void)fflush(stdout);	    }#endif	    if (nLocal != maxLocal) {		/*		 * Job cannot be remigrated, but there's room on the local		 * machine, so resume the job and note that another		 * local job has started.		 */		if (#ifdef REMOTE		    verboseRemigrates ||#endif		    DEBUG(JOB)) {		    (void)fprintf(stdout, "*** resuming on local machine\n");		    (void)fflush(stdout);		}		KILL(job->pid, SIGCONT);		nLocal +=1;#ifdef REMOTE		job->flags &= ~(JOB_REMIGRATE|JOB_RESUME|JOB_REMOTE);		job->flags |= JOB_CONTINUING;#else		job->flags &= ~(JOB_REMIGRATE|JOB_RESUME);#endif	} else {		/*		 * Job cannot be restarted. Mark the table as full and		 * place the job back on the list of stopped jobs.		 */		if (#ifdef REMOTE		    verboseRemigrates ||#endif		    DEBUG(JOB)) {		   (void)fprintf(stdout, "*** holding\n");		   (void)fflush(stdout);		}		Lst_AtFront(&stoppedJobs, job);		jobFull = TRUE;		if (DEBUG(JOB)) {		   (void)fprintf(stdout, "Job queue is full.\n");		   (void)fflush(stdout);		}		return;	    }#ifdef REMOTE	} else {	    /*	     * Clear out the remigrate and resume flags. Set the continuing	     * flag so we know later on that the process isn't exiting just	     * because of a signal.	     */	    job->flags &= ~(JOB_REMIGRATE|JOB_RESUME);	    job->flags |= JOB_CONTINUING;	    job->rmtID = host;	}#endif	Lst_AtEnd(&jobs, job);	nJobs += 1;	if (nJobs == maxJobs) {	    jobFull = TRUE;	    if (DEBUG(JOB)) {		(void)fprintf(stdout, "Job queue is full.\n");		(void)fflush(stdout);	    }	}    } else if (job->flags & JOB_RESTART) {	/*	 * Set up the control arguments to the shell. This is based on the	 * flags set earlier for this job. If the JOB_IGNERR flag is clear,	 * the 'exit' flag of the commandShell is used to cause it to exit	 * upon receiving an error. If the JOB_SILENT flag is clear, the	 * 'echo' flag of the commandShell is used to get it to start echoing	 * as soon as it starts processing commands.	 */	char	  *argv[4];	JobMakeArgv(job, argv);	if (DEBUG(JOB)) {	    (void)fprintf(stdout, "Restarting %s...", job->node->name);	    (void)fflush(stdout);	}#ifdef REMOTE	if ((job->node->type&OP_NOEXPORT) ||	    (nLocal < maxLocal && runLocalFirst)# ifdef RMT_NO_EXEC	    || !Rmt_Export(shellPath, argv, job)# else	    || !Rmt_Begin(shellPath, argv, job->node)# endif#endif	{	    if (nLocal >= maxLocal && !(job->flags & JOB_SPECIAL)) {		/*		 * Can't be exported and not allowed to run locally -- put it		 * back on the hold queue and mark the table full		 */		if (DEBUG(JOB)) {		    (void)fprintf(stdout, "holding\n");		    (void)fflush(stdout);		}		Lst_AtFront(&stoppedJobs, job);		jobFull = TRUE;		if (DEBUG(JOB)) {		    (void)fprintf(stdout, "Job queue is full.\n");		    (void)fflush(stdout);		}		return;	    } else {		/*		 * Job may be run locally.		 */		if (DEBUG(JOB)) {		    (void)fprintf(stdout, "running locally\n");		    (void)fflush(stdout);		}		job->flags &= ~JOB_REMOTE;	    }	}#ifdef REMOTE	else {	    /*	     * Can be exported. Hooray!	     */	    if (DEBUG(JOB)) {		(void)fprintf(stdout, "exporting\n");		(void)fflush(stdout);	    }	    job->flags |= JOB_REMOTE;	}#endif	JobExec(job, argv);    } else {	/*	 * The job has stopped and needs to be restarted. Why it stopped,	 * we don't know...	 */	if (DEBUG(JOB)) {	   (void)fprintf(stdout, "Resuming %s...", job->node->name);	   (void)fflush(stdout);	}	if (((job->flags & JOB_REMOTE) ||	    nLocal < maxLocal ||#ifdef REMOTE	    ((job->flags & JOB_SPECIAL) &&	      (job->node->type & OP_NOEXPORT) &&	     maxLocal == 0)#else	    ((job->flags & JOB_SPECIAL) &&	     maxLocal == 0)#endif	   ) && nJobs != maxJobs)	{	    /*	     * If the job is remote, it's ok to resume it as long as the	     * maximum concurrency won't be exceeded. If it's local and	     * we haven't reached the local concurrency limit already (or the	     * job must be run locally and maxLocal is 0), it's also ok to	     * resume it.	     */	    Boolean error;	    int status;#ifdef RMT_WANTS_SIGNALS	    if (job->flags & JOB_REMOTE) {		error = !Rmt_Signal(job, SIGCONT);	    } else#endif	/* RMT_WANTS_SIGNALS */		error = KILL(job->pid, SIGCONT) != 0;	    if (!error) {		/*		 * Make sure the user knows we've continued the beast and		 * actually put the thing in the job table.		 */		job->flags |= JOB_CONTINUING;		W_SETTERMSIG(&status, SIGCONT);		JobFinish(job, &status);		job->flags &= ~(JOB_RESUME|JOB_CONTINUING);		if (DEBUG(JOB)) {		   (void)fprintf(stdout, "done\n");		   (void)fflush(stdout);		}	    } else {		Error("couldn't resume %s: %s",		    job->node->name, strerror(errno));		status = 0;		W_SETEXITSTATUS(&status, 1);		JobFinish(job, &status);	    }	} else {	    /*	     * Job cannot be restarted. Mark the table as full and	     * place the job back on the list of stopped jobs.	     */	    if (DEBUG(JOB)) {		(void)fprintf(stdout, "table full\n");		(void)fflush(stdout);	    }	    Lst_AtFront(&stoppedJobs, job);	    jobFull = TRUE;	    if (DEBUG(JOB)) {		(void)fprintf(stdout, "Job queue is full.\n");		(void)fflush(stdout);	    }	}    }}