help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to get make to terminate itself at the first error?


From: Paul Smith
Subject: Re: how to get make to terminate itself at the first error?
Date: Mon, 02 Feb 2009 15:24:01 -0500

On Mon, 2009-02-02 at 15:12 -0500, Martin d'Anjou wrote:
> Hello,
> 
> In jobs.c, when I introduce a call to fatal_error_signal(SIGTERM) here:
> 
> parallel make terminates at the first error. However, jobs don't appear to 
> die equaly, as some jobs keep running, and when I use process substitution 
> t=$(make -j 2), it won't return unless the jobs are gone from the process 
> table.
> 
> What is the correct way to have make self-terminate one the first error
> as if control-C was hit on the command line?

There is no way.  Make will always wait for any outstanding jobs to
complete before it exits, and it never tries to kill any outstanding job
"before its time", as far as I recall.

Well, I guess you could change the code to send a SIGINT to the process
group, the same way using ^C at the command line would.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]