usr.bin/make/job.c
/*-
 *-----------------------------------------------------------------------
 * Job_AbortAll --
 *	Abort all currently running jobs without handling output or anything.
 *	This function is to be called only in the event of a major
 *	error. Most definitely NOT to be called from JobInterrupt.
 *
 * Results:
 *	None
 *
 * Side Effects:
 *	All children are killed, not just the firstborn
 *-----------------------------------------------------------------------
 */
Job_AbortAll
Abort all currently running jobs without handling output or anything.
This function is to be called only in the event of a major
error. Most definitely NOT to be called from JobInterrupt.

None

Side Effects:
All children are killed, not just the firstborn
Job_AbortAll Abort all currently running jobs without handling output or anything . This function is to be called only in the event of a major error . Most definitely NOT to be called from JobInterrupt . None Side Effects : All children are killed not just the firstborn
void
Job_AbortAll ()
{
    LstNode           	ln;		
    Job            	*job;	
    int     	  	foo;
    aborting = ABORT_ERROR;
    if (nJobs) {
	(void)Lst_Open (jobs);
	while ((ln = Lst_Next (jobs)) != NILLNODE) {
	    job = (Job *) Lst_Datum (ln);
#ifdef RMT_WANTS_SIGNALS
	    if (job->flags & JOB_REMOTE) {
		Rmt_Signal(job, SIGINT);
		Rmt_Signal(job, SIGKILL);
	    } else {
		KILL(job->pid, SIGINT);
		KILL(job->pid, SIGKILL);
	    }
#else
	    KILL(job->pid, SIGINT);
	    KILL(job->pid, SIGKILL);
#endif 
	}
    }
    while (wait3(&foo, WNOHANG, (struct rusage *)0) > 0)
	continue;
    (void) unlink (tfile);
}
void Job_AbortAll ( ) { LstNode ln ; Job * job ; int foo ; aborting = ABORT_ERROR ; if ( nJobs ) { ( void ) Lst_Open ( jobs ) ; while ( ( ln = Lst_Next ( jobs ) ) != NILLNODE ) { job = ( Job * ) Lst_Datum ( ln ) ; #ifdef RMT_WANTS_SIGNALS if ( job -> flags & JOB_REMOTE ) { Rmt_Signal ( job , SIGINT ) ; Rmt_Signal ( job , SIGKILL ) ; } else { KILL ( job -> pid , SIGINT ) ; KILL ( job -> pid , SIGKILL ) ; } #else KILL ( job -> pid , SIGINT ) ; KILL ( job -> pid , SIGKILL ) ; #endif } } while ( wait3 ( & foo , WNOHANG , ( struct rusage * ) 0 ) > 0 ) continue ; ( void ) unlink ( tfile ) ; }
Job_AbortAll
      Abort all currently running jobs without handling output or anything.
Job_AbortAll Abort all currently running jobs without handling output or anything .
/* element in job table */ /* the job descriptor in that element */ /*
	     * kill the child process with increasingly drastic signals to make
	     * darn sure it's dead. 
	     */ /* RMT_WANTS_SIGNALS */ /*
     * Catch as many children as want to report in at first, then give up
     */