1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-14 20:45:22 +02:00

[267402] [telnet] "launch shell" takes forever

This commit is contained in:
Martin Oberhuber 2009-03-09 10:37:51 +00:00
parent 9f180bf7f9
commit fb7fe2edba
3 changed files with 22 additions and 16 deletions

View file

@ -41,8 +41,8 @@ plugin@org.eclipse.rse.services.dstore=v200903051130,:pserver:anonymous:none@dev
plugin@org.eclipse.rse.services.files.ftp=v200903070130,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.files.ftp plugin@org.eclipse.rse.services.files.ftp=v200903070130,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.files.ftp
plugin@org.eclipse.rse.services.local=v200812041630,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.local plugin@org.eclipse.rse.services.local=v200812041630,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.local
plugin@org.eclipse.rse.services.ssh=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.ssh plugin@org.eclipse.rse.services.ssh=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.ssh
plugin@org.eclipse.rse.services.telnet=v200903070130,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.telnet plugin@org.eclipse.rse.services.telnet=v200903091037,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.telnet
plugin@org.eclipse.rse.services=v200903070130,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services plugin@org.eclipse.rse.services=v200903091037,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services
plugin@org.eclipse.rse.shells.ui=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.shells.ui plugin@org.eclipse.rse.shells.ui=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.shells.ui
plugin@org.eclipse.rse.subsystems.files.core=v200903051130,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.files.core plugin@org.eclipse.rse.subsystems.files.core=v200903051130,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.files.core
plugin@org.eclipse.rse.subsystems.files.dstore=v200903051130,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.files.dstore plugin@org.eclipse.rse.subsystems.files.dstore=v200903051130,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.files.dstore

View file

@ -10,6 +10,7 @@
* Anna Dushistova (MontaVista) - [170910] Integrate the TM Terminal View with RSE * Anna Dushistova (MontaVista) - [170910] Integrate the TM Terminal View with RSE
* Martin Oberhuber (Wind River) - [227320] Fix endless loop in TelnetTerminalShell * Martin Oberhuber (Wind River) - [227320] Fix endless loop in TelnetTerminalShell
* Anna Dushistova (MontaVista) - [240523] [rseterminals] Provide a generic adapter factory that adapts any ITerminalService to an IShellService * Anna Dushistova (MontaVista) - [240523] [rseterminals] Provide a generic adapter factory that adapts any ITerminalService to an IShellService
* Martin Oberhuber (Wind River) - [267402] [telnet] "launch shell" takes forever
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.services.telnet.terminal; package org.eclipse.rse.internal.services.telnet.terminal;
@ -91,14 +92,17 @@ public class TelnetTerminalShell extends AbstractTerminalShell {
|| System.getProperty("os.name").toLowerCase().startsWith( //$NON-NLS-1$ || System.getProperty("os.name").toLowerCase().startsWith( //$NON-NLS-1$
"linux");//$NON-NLS-1$ "linux");//$NON-NLS-1$
fEncoding = encoding; fEncoding = encoding;
fTelnetClient = new TelnetClient(ptyType); if (ptyType == null) {
fTelnetClient = new TelnetClient();
} else {
fTelnetClient = new TelnetClient(ptyType);
fTelnetClient.addOptionHandler(new TerminalTypeOptionHandler(ptyType, true, true, true, true));
}
// request remote echo, but accept local if desired // request remote echo, but accept local if desired
fTelnetClient.addOptionHandler(new EchoOptionHandler(false, true, fTelnetClient.addOptionHandler(new EchoOptionHandler(false, true,
true, true)); true, true));
fTelnetClient.addOptionHandler(new SuppressGAOptionHandler(true, fTelnetClient.addOptionHandler(new SuppressGAOptionHandler(true,
true, true, true)); true, true, true));
fTelnetClient.addOptionHandler(new TerminalTypeOptionHandler(
ptyType, true, true, true, true));
fTelnetClient = fSessionProvider.loginTelnetClient(fTelnetClient, fTelnetClient = fSessionProvider.loginTelnetClient(fTelnetClient,
new NullProgressMonitor()); new NullProgressMonitor());
fOutputStream = fTelnetClient.getOutputStream(); fOutputStream = fTelnetClient.getOutputStream();

View file

@ -20,6 +20,7 @@
* Anna Dushistova (MontaVista) - adapted from SshShellService * Anna Dushistova (MontaVista) - adapted from SshShellService
* Anna Dushistova (MontaVista) - [240523] [rseterminals] Provide a generic adapter factory that adapts any ITerminalService to an IShellService * Anna Dushistova (MontaVista) - [240523] [rseterminals] Provide a generic adapter factory that adapts any ITerminalService to an IShellService
* Anna Dushistova (MontaVista) - [261478] Remove SshShellService, SshHostShell (or deprecate and schedule for removal in 3.2) * Anna Dushistova (MontaVista) - [261478] Remove SshShellService, SshHostShell (or deprecate and schedule for removal in 3.2)
* Martin Oberhuber (Wind River) - [267402] [telnet] "launch shell" takes forever
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.services.shells; package org.eclipse.rse.internal.services.shells;
@ -49,18 +50,19 @@ public class TerminalShellService extends AbstractShellService {
public IHostShell launchShell(String initialWorkingDirectory, public IHostShell launchShell(String initialWorkingDirectory,
String encoding, String[] environment, IProgressMonitor monitor) String encoding, String[] environment, IProgressMonitor monitor)
throws SystemMessageException { throws SystemMessageException {
ITerminalShell terminalShell = fTerminalService.launchTerminal(null, return runCommand(initialWorkingDirectory, TerminalServiceHostShell.SHELL_INVOCATION, encoding, environment, monitor);
encoding, environment, initialWorkingDirectory, null, monitor);
TerminalServiceHostShell hostShell = new TerminalServiceHostShell(
terminalShell, initialWorkingDirectory,
TerminalServiceHostShell.SHELL_INVOCATION, environment);
return hostShell;
} }
public IHostShell runCommand(String initialWorkingDirectory, public IHostShell runCommand(String initialWorkingDirectory, String command, String encoding, String[] environment, IProgressMonitor monitor)
String command, String encoding, String[] environment, throws SystemMessageException {
IProgressMonitor monitor) throws SystemMessageException { // vt100 is the most common kind of terminal, and default for Telnet
ITerminalShell terminalShell = fTerminalService.launchTerminal(null, // and SSH: see Commons Net TelnetClient#TelnetClient() and JSch
// ChannelSession#ttype.
// We therefore pick vt100 here, and adapt to it by ignoring control
// sequences in TerminalServiceShellOutputReader line 100. We could
// also request a "dumb" type here, but testing showed that the
// prompt is then not detected correctly.
ITerminalShell terminalShell = fTerminalService.launchTerminal("vt100", //$NON-NLS-1$
encoding, environment, initialWorkingDirectory, null, monitor); encoding, environment, initialWorkingDirectory, null, monitor);
TerminalServiceHostShell hostShell = new TerminalServiceHostShell( TerminalServiceHostShell hostShell = new TerminalServiceHostShell(
terminalShell, initialWorkingDirectory, command, environment); terminalShell, initialWorkingDirectory, command, environment);
@ -95,7 +97,7 @@ public class TerminalShellService extends AbstractShellService {
} }
return o; return o;
} }
public String getName() public String getName()
{ {
return RSEServicesMessages.TerminalShellService_name; return RSEServicesMessages.TerminalShellService_name;