Ensure PrintOnError always reports 'stopped in' on first call.
We may still suppress the rest of the noise if shouldDieQuietly says to, but the 'stopped in' output is too important to lose. Avoid repeating it though in the same process. For the case of aborting due to failure detected elsewhere, exit 6 so we have a clue. PR: 55578 Reviewed by:
This commit is contained in:
parent
af03d2a051
commit
336a7b2bd2
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: job.c,v 1.393 2021/01/08 04:36:44 sjg Exp $ */
|
||||
/* $NetBSD: job.c,v 1.394 2021/01/08 21:46:50 sjg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
|
||||
@ -143,7 +143,7 @@
|
||||
#include "trace.h"
|
||||
|
||||
/* "@(#)job.c 8.2 (Berkeley) 3/19/94" */
|
||||
MAKE_RCSID("$NetBSD: job.c,v 1.393 2021/01/08 04:36:44 sjg Exp $");
|
||||
MAKE_RCSID("$NetBSD: job.c,v 1.394 2021/01/08 21:46:50 sjg Exp $");
|
||||
|
||||
/*
|
||||
* A shell defines how the commands are run. All commands for a target are
|
||||
@ -2864,7 +2864,7 @@ Job_TokenWithdraw(void)
|
||||
errno == EAGAIN)
|
||||
continue;
|
||||
if (shouldDieQuietly(NULL, 1))
|
||||
exit(2);
|
||||
exit(6); /* we aborted */
|
||||
Fatal("A failure has been detected "
|
||||
"in another branch of the parallel make");
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.508 2020/12/31 17:39:36 rillig Exp $ */
|
||||
/* $NetBSD: main.c,v 1.509 2021/01/08 21:46:50 sjg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
@ -110,7 +110,7 @@
|
||||
#include "trace.h"
|
||||
|
||||
/* "@(#)main.c 8.3 (Berkeley) 3/19/94" */
|
||||
MAKE_RCSID("$NetBSD: main.c,v 1.508 2020/12/31 17:39:36 rillig Exp $");
|
||||
MAKE_RCSID("$NetBSD: main.c,v 1.509 2021/01/08 21:46:50 sjg Exp $");
|
||||
#if defined(MAKE_NATIVE) && !defined(lint)
|
||||
__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
|
||||
"The Regents of the University of California. "
|
||||
@ -2132,16 +2132,16 @@ PrintOnError(GNode *gn, const char *msg)
|
||||
Var_Stats();
|
||||
}
|
||||
|
||||
/* we generally want to keep quiet if a sub-make died */
|
||||
if (shouldDieQuietly(gn, -1))
|
||||
return;
|
||||
if (errorNode != NULL)
|
||||
return; /* we've been here! */
|
||||
|
||||
if (msg != NULL)
|
||||
printf("%s", msg);
|
||||
printf("\n%s: stopped in %s\n", progname, curdir);
|
||||
|
||||
if (errorNode != NULL)
|
||||
return; /* we've been here! */
|
||||
/* we generally want to keep quiet if a sub-make died */
|
||||
if (shouldDieQuietly(gn, -1))
|
||||
return;
|
||||
|
||||
if (gn != NULL)
|
||||
SetErrorVars(gn);
|
||||
|
@ -5,5 +5,7 @@ false
|
||||
make: stopped in unit-tests
|
||||
1 error
|
||||
|
||||
make: stopped in unit-tests
|
||||
|
||||
make: stopped in unit-tests
|
||||
exit status 2
|
||||
|
Loading…
Reference in New Issue
Block a user