diff options
author | 2017-11-28 01:14:34 -0800 | |
---|---|---|
committer | 2017-11-28 01:16:40 -0800 | |
commit | 32e7a1c55289ff286d5a6f0dea41d76fdf48582b (patch) | |
tree | 6189098c9f8d40967e6f78d0bfa015b0b820af66 /src/main/java/com/google/devtools/build/lib/exec/AbstractSpawnStrategy.java | |
parent | 25eab014b36753d3b959f4f5f883d0c6ea2ccaad (diff) |
Simplify SpawnRunner interface
It turns out that the SUCCESS status is often misunderstood to mean "zero exit",
even though this is clearly documented. I've decided to add another status for
non-zero exit, and use success only for zero exit to avoid this pitfall.
Also, many of the status codes are set, but never used. I decided to reduce the
number of status codes to only those that are actually relevant, which
simplifies further processing. Instead, we should add a string message for the
error case when we need one - we're not using it right now, so I decided not to
add that yet.
PiperOrigin-RevId: 177129441
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/exec/AbstractSpawnStrategy.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/exec/AbstractSpawnStrategy.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/exec/AbstractSpawnStrategy.java b/src/main/java/com/google/devtools/build/lib/exec/AbstractSpawnStrategy.java index 0f1cf259c0..1512a0139c 100644 --- a/src/main/java/com/google/devtools/build/lib/exec/AbstractSpawnStrategy.java +++ b/src/main/java/com/google/devtools/build/lib/exec/AbstractSpawnStrategy.java @@ -105,7 +105,7 @@ public abstract class AbstractSpawnStrategy implements SandboxedSpawnActionConte throw new EnvironmentalExecException("Unexpected IO error.", e); } - if ((spawnResult.status() != Status.SUCCESS) || (spawnResult.exitCode() != 0)) { + if (spawnResult.status() != Status.SUCCESS) { String cwd = actionExecutionContext.getExecRoot().getPathString(); String message = CommandFailureUtils.describeCommandFailure( |