Date: Fri, 6 Sep 2013 02:55:51 +0000 (UTC) From: "Simon J. Gerraty" <sjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255285 - head/contrib/bmake Message-ID: <201309060255.r862tptD016923@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sjg Date: Fri Sep 6 02:55:51 2013 New Revision: 255285 URL: http://svnweb.freebsd.org/changeset/base/255285 Log: 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 Modified: head/contrib/bmake/job.c Modified: head/contrib/bmake/job.c ============================================================================== --- head/contrib/bmake/job.c Fri Sep 6 02:34:34 2013 (r255284) +++ head/contrib/bmake/job.c Fri Sep 6 02:55:51 2013 (r255285) @@ -178,6 +178,14 @@ __RCSID("$NetBSD: job.c,v 1.176 2013/08/ */ #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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309060255.r862tptD016923>