diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java index 30d701fc05e..7629fbfe8cf 100644 --- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java +++ b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java @@ -359,13 +359,13 @@ public class VT100TerminalControl implements ITerminalControlForText, ITerminalC job.cancel(); // Join job to avoid leaving job running after workbench shutdown (333613). try { - fInputStream.close(); + // The Job will check its cancel status after 500msec latest. But we still + // Interrupt the Job, such that it can join fast enough during Workbench shutdown (bug 333613). + // TODO closing fInputStream may seem more clean but causes problems (bug 348700). + Thread t = job.getThread(); + if(t!=null) t.interrupt(); job.join(); - } catch (IOException e1) { - } catch (InterruptedException e) { - } -// Thread t = job.getThread(); -// if(t!=null) t.interrupt(); + } catch (InterruptedException e) {} } if (getState()==TerminalState.CLOSED) {