diff options
author | 2018-03-23 02:47:44 -0700 | |
---|---|---|
committer | 2018-03-23 02:49:10 -0700 | |
commit | 7a51a7c44df334f8e67a793788caf520b5127db4 (patch) | |
tree | 7e50ac2fd8ba2a1a2830d32be9ec9e3c53fe26cb /src/main/java/com/google/devtools/build/lib/sandbox/SandboxActionContextProvider.java | |
parent | 3b9cf80c3cadce94ca4a7aa1a3f5c8756e4ac9e4 (diff) |
Remove unnecessary product name and constructors from sandboxed spawn runners.
The product name was previously propagated to all sandboxed spawn runners
unconditionally, even when the majority did not need it. Also, these
same spawn runners had obsolete constructors that were not used at all or
were only used in tests. Remove both for simplicity.
RELNOTES: None.
PiperOrigin-RevId: 190195305
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/sandbox/SandboxActionContextProvider.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/sandbox/SandboxActionContextProvider.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/sandbox/SandboxActionContextProvider.java b/src/main/java/com/google/devtools/build/lib/sandbox/SandboxActionContextProvider.java index 37b100cf6d..31da786227 100644 --- a/src/main/java/com/google/devtools/build/lib/sandbox/SandboxActionContextProvider.java +++ b/src/main/java/com/google/devtools/build/lib/sandbox/SandboxActionContextProvider.java @@ -59,7 +59,6 @@ final class SandboxActionContextProvider extends ActionContextProvider { if (timeoutKillDelaySeconds >= 0) { timeoutKillDelay = Optional.of(Duration.ofSeconds(timeoutKillDelaySeconds)); } - String productName = cmdEnv.getRuntime().getProductName(); // This works on most platforms, but isn't the best choice, so we put it first and let later // platform-specific sandboxing strategies become the default. @@ -68,7 +67,7 @@ final class SandboxActionContextProvider extends ActionContextProvider { withFallback( cmdEnv, new ProcessWrapperSandboxedSpawnRunner( - cmdEnv, sandboxBase, productName, timeoutKillDelay)); + cmdEnv, sandboxBase, cmdEnv.getRuntime().getProductName(), timeoutKillDelay)); contexts.add(new ProcessWrapperSandboxedStrategy(cmdEnv.getExecRoot(), spawnRunner)); } @@ -78,7 +77,7 @@ final class SandboxActionContextProvider extends ActionContextProvider { SpawnRunner spawnRunner = withFallback( cmdEnv, - LinuxSandboxedStrategy.create(cmdEnv, sandboxBase, productName, timeoutKillDelay)); + LinuxSandboxedStrategy.create(cmdEnv, sandboxBase, timeoutKillDelay)); contexts.add(new LinuxSandboxedStrategy(cmdEnv.getExecRoot(), spawnRunner)); } @@ -87,8 +86,7 @@ final class SandboxActionContextProvider extends ActionContextProvider { SpawnRunner spawnRunner = withFallback( cmdEnv, - new DarwinSandboxedSpawnRunner(cmdEnv, sandboxBase, productName, timeoutKillDelay, - process)); + new DarwinSandboxedSpawnRunner(cmdEnv, sandboxBase, timeoutKillDelay, process)); contexts.add(new DarwinSandboxedStrategy(cmdEnv.getExecRoot(), spawnRunner)); } |