diff options
Diffstat (limited to 'contrib/bmake/job.c')
-rw-r--r-- | contrib/bmake/job.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/contrib/bmake/job.c b/contrib/bmake/job.c index 637db4a..4e22959 100644 --- a/contrib/bmake/job.c +++ b/contrib/bmake/job.c @@ -178,6 +178,14 @@ __RCSID("$NetBSD: job.c,v 1.176 2013/08/04 16:48:15 sjg Exp $"); */ #define MAKE_ALWAYS_PASS_JOB_QUEUE ".MAKE.ALWAYS_PASS_JOB_QUEUE" static int Always_pass_job_queue = TRUE; +/* + * FreeBSD: aborting entire parallel make isn't always + * desired. When doing tinderbox for example, failure of + * one architecture should not stop all. + * We still want to bail on interrupt though. + */ +#define MAKE_JOB_ERROR_TOKEN "MAKE_JOB_ERROR_TOKEN" +static int Job_error_token = TRUE; /* * error handling variables @@ -2237,6 +2245,9 @@ Job_Init(void) Always_pass_job_queue = getBoolean(MAKE_ALWAYS_PASS_JOB_QUEUE, Always_pass_job_queue); + Job_error_token = getBoolean(MAKE_JOB_ERROR_TOKEN, Job_error_token); + + /* * There is a non-zero chance that we already have children. * eg after 'make -f- <<EOF' @@ -2832,13 +2843,19 @@ JobTokenAdd(void) { char tok = JOB_TOKENS[aborting], tok1; + if (!Job_error_token && aborting == ABORT_ERROR) { + if (jobTokensRunning == 0) + return; + tok = '+'; /* no error token */ + } + /* If we are depositing an error token flush everything else */ while (tok != '+' && read(tokenWaitJob.inPipe, &tok1, 1) == 1) continue; if (DEBUG(JOB)) fprintf(debug_file, "(%d) aborting %d, deposit token %c\n", - getpid(), aborting, JOB_TOKENS[aborting]); + getpid(), aborting, tok); while (write(tokenWaitJob.outPipe, &tok, 1) == -1 && errno == EAGAIN) continue; } |