Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2011-10-03 21:48:58 +0000
committerEugene Tarassov2011-10-03 21:48:58 +0000
commit2ae0643ac198fb5ee9b9b09c3aae600d69a52aff (patch)
treecc3d5259df8648f5694b5391d5a73906c86ce3bd
parent1c950e35a76ef2d9e233b19c3ba536ab4a323fd1 (diff)
downloadorg.eclipse.tcf-2ae0643ac198fb5ee9b9b09c3aae600d69a52aff.tar.gz
org.eclipse.tcf-2ae0643ac198fb5ee9b9b09c3aae600d69a52aff.tar.xz
org.eclipse.tcf-2ae0643ac198fb5ee9b9b09c3aae600d69a52aff.zip
TCF RSE: fixed racing in TCFTerminalShell
-rw-r--r--plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/shells/TCFTerminalShell.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/shells/TCFTerminalShell.java b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/shells/TCFTerminalShell.java
index ef4890302..df78289f0 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/shells/TCFTerminalShell.java
+++ b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/shells/TCFTerminalShell.java
@@ -221,14 +221,17 @@ public class TCFTerminalShell extends AbstractTerminalShell {
new TCFRSETask<ITerminals.TerminalContext>() {
public void run() {
terminal = ((TCFConnectorService)sessionProvider).getService(ITerminals.class);
- terminal.addListener(listeners);
terminal.launch(ptyType, encoding, environment, new ITerminals.DoneLaunch() {
public void doneLaunch(IToken token, Exception error,
- ITerminals.TerminalContext terminal) {
+ ITerminals.TerminalContext ctx) {
+
+ if (ctx != null) {
+ terminalContext = ctx;
+ terminal.addListener(listeners);
+ }
- terminalContext = terminal;
if (error != null) error(error);
- else done(terminal);
+ else done(ctx);
}
});
}

Back to the top