From 32e7a1c55289ff286d5a6f0dea41d76fdf48582b Mon Sep 17 00:00:00 2001 From: ulfjack Date: Tue, 28 Nov 2017 01:14:34 -0800 Subject: 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 --- .../java/com/google/devtools/build/lib/exec/AbstractSpawnStrategy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/com/google/devtools/build/lib/exec/AbstractSpawnStrategy.java') 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( -- cgit v1.2.3