aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2013-09-06 02:55:51 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2013-09-06 02:55:51 +0000
commit2d395cb50730d1c3197b2c2656d88f28c62b7f42 (patch)
treeaa5ae72d5434162c185ce3ef68bf405f101cd7aa
parent318677ad92cf5dec55bc05e8d9afecf7ef704e13 (diff)
downloadsrc-2d395cb50730d1c3197b2c2656d88f28c62b7f42.tar.gz
src-2d395cb50730d1c3197b2c2656d88f28c62b7f42.zip
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
Notes
Notes: svn path=/head/; revision=255285
-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 637db4ab9856..4e2295908bc0 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;
}