summaryrefslogtreecommitdiffstats
path: root/contrib/bmake
diff options
context:
space:
mode:
authorsjg <sjg@FreeBSD.org>2013-09-06 02:55:51 +0000
committersjg <sjg@FreeBSD.org>2013-09-06 02:55:51 +0000
commit8e87a06e3bb953f5ad66e6ec32e5419312ee951d (patch)
treeaa5ae72d5434162c185ce3ef68bf405f101cd7aa /contrib/bmake
parent13a117b3c6284b73ccc930ca12683941fda83810 (diff)
downloadFreeBSD-src-8e87a06e3bb953f5ad66e6ec32e5419312ee951d.zip
FreeBSD-src-8e87a06e3bb953f5ad66e6ec32e5419312ee951d.tar.gz
If MAKE_JOB_ERROR_TOKEN is set to false, do not put an error token ("E")
into the job queue. This avoids closing down an entire build on failure of one branch. Probably has no use outside the context of universe/tinderbox. Reviewed by: obrien
Diffstat (limited to 'contrib/bmake')
-rw-r--r--contrib/bmake/job.c19
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;
}
OpenPOWER on IntegriCloud