1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 09:25:31 +02:00

[194466] Fix shell terminated state when stream is closed

This commit is contained in:
Martin Oberhuber 2007-08-17 11:22:48 +00:00
parent 194db3948a
commit ea3fbeb2a4

View file

@ -16,6 +16,7 @@
* Sheldon D'souza (Celunite) - Adapted from SshHostShell
* Sheldon D'souza (Celunite) - [187301] support multiple telnet shells
* David McKnight (IBM) - [191599] Use the remote encoding specified in the host property page
* Martin Oberhuber (Wind River) - [194466] Fix shell terminated state when stream is closed
*******************************************************************************/
package org.eclipse.rse.internal.services.telnet.shell;
@ -94,7 +95,9 @@ public class TelnetHostShell extends AbstractHostShell implements IHostShell {
}
public void exit() {
fShellWriter.stopThread();
if (fShellWriter.isAlive()) {
fShellWriter.stopThread();
}
try {
//TODO disconnect should better be done via the ConnectorService!!
//Because like we do it here, the connector service is not notified!
@ -118,7 +121,7 @@ public class TelnetHostShell extends AbstractHostShell implements IHostShell {
}
public boolean isActive() {
if (fTelnetClient!=null && fTelnetClient.isConnected()) {
if (fTelnetClient!=null && fTelnetClient.isConnected() && !fStdoutHandler.isFinished()) {
return true;
}
// shell is not active: check for session lost