diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2011-12-01 20:55:18 (GMT) |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2012-02-04 21:46:12 (GMT) |
commit | 44f58aeca923d6e3001636f8c0d24a6d513d8ea2 (patch) | |
tree | 9507856d2854532510f8a38fdc11c5f19f21554a /src/build.h | |
parent | 85ff781fa30fff63c01ccd30faaad39d766e1505 (diff) | |
download | Ninja-44f58aeca923d6e3001636f8c0d24a6d513d8ea2.zip Ninja-44f58aeca923d6e3001636f8c0d24a6d513d8ea2.tar.gz Ninja-44f58aeca923d6e3001636f8c0d24a6d513d8ea2.tar.bz2 |
If a command fails, wait for all running commands to terminate before we do
Previously, if a command fails, the fate of the other child processes
running in parallel was inadequately controlled. On POSIX platforms,
the processes were orphaned. Normally they would run to completion,
but were liable to being killed by a SIGPIPE. On Windows, the child
processes would terminate with the parent. The cleanup-on-interrupt
patch caused the SubprocessSet and Builder destructors to clean
up after themselves by killing any running child processes and
deleting their output files, making the behaviour more predictable
and consistent across platforms.
If the build is interrupted by the user, this is correct behaviour.
But in the case where the build is stopped by a failed command, this
would be inconsistent with user expectations. In the latter case,
we now let any remaining child processes run to completion before
leaving the main loop in Builder::Build.
Diffstat (limited to 'src/build.h')
-rw-r--r-- | src/build.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/build.h b/src/build.h index c75bde1..778d59d 100644 --- a/src/build.h +++ b/src/build.h @@ -98,7 +98,7 @@ struct CommandRunner { /// Options (e.g. verbosity, parallelism) passed to a build. struct BuildConfig { BuildConfig() : verbosity(NORMAL), dry_run(false), parallelism(1), - swallow_failures(0) {} + failures_allowed(1) {} enum Verbosity { NORMAL, @@ -108,7 +108,7 @@ struct BuildConfig { Verbosity verbosity; bool dry_run; int parallelism; - int swallow_failures; + int failures_allowed; }; /// Builder wraps the build process: starting commands, updating status. |