Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2016-08-24 20:31:49 +0000
committerJeff Johnston2016-08-26 15:47:05 +0000
commit54e5c8ca044f99fb6cacb4f55a83e5259cdb9008 (patch)
tree82276e30c1402d9b797104f8c94534b7dcdc6177
parente7e84ec6cc44c8c8bbe2698565b330a29c5df9d2 (diff)
downloadorg.eclipse.linuxtools-54e5c8ca044f99fb6cacb4f55a83e5259cdb9008.tar.gz
org.eclipse.linuxtools-54e5c8ca044f99fb6cacb4f55a83e5259cdb9008.tar.xz
org.eclipse.linuxtools-54e5c8ca044f99fb6cacb4f55a83e5259cdb9008.zip
Bug 499954 - Container with TTY doesn't display log or remove logs
- for terminals, always wait for container to be running or else finished Change-Id: I26a46657bf635e318b1fa0a35275dd0b78ccfd8b Reviewed-on: https://git.eclipse.org/r/79670 Tested-by: Hudson CI Reviewed-by: Jeff Johnston <jjohnstn@redhat.com> (cherry picked from commit b9acdde66cb6a6385264bb9392410f46851880fa) Reviewed-on: https://git.eclipse.org/r/79779
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/consoles/RunConsole.java20
1 files changed, 9 insertions, 11 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/consoles/RunConsole.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/consoles/RunConsole.java
index 2fa980fa16..4a240483c0 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/consoles/RunConsole.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/consoles/RunConsole.java
@@ -168,17 +168,15 @@ public class RunConsole extends IOConsole {
Thread t = new Thread(() -> {
try {
DockerConnection conn = (DockerConnection) connection;
- if (conn.getContainerInfo(containerId).config().openStdin()) {
- IDockerContainerState state = conn
- .getContainerInfo(containerId).state();
- do {
- if (!state.running() && state.finishDate() == null) {
- Thread.sleep(300);
- }
- state = conn.getContainerInfo(containerId).state();
- } while (!state.running() && state.finishDate() == null);
- conn.attachCommand(containerId, null, null);
- }
+ IDockerContainerState state = conn.getContainerInfo(containerId)
+ .state();
+ do {
+ if (!state.running() && state.finishDate() == null) {
+ Thread.sleep(300);
+ }
+ state = conn.getContainerInfo(containerId).state();
+ } while (!state.running() && state.finishDate() == null);
+ conn.attachCommand(containerId, null, null);
} catch (Exception e) {
}
});

Back to the top