mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 07:05:24 +02:00
[267402] [telnet] "launch shell" takes forever
This commit is contained in:
parent
9f180bf7f9
commit
fb7fe2edba
3 changed files with 22 additions and 16 deletions
|
@ -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.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.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=v200903070130,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services
|
||||
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=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.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
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
* Anna Dushistova (MontaVista) - [170910] Integrate the TM Terminal View with RSE
|
||||
* 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
|
||||
* Martin Oberhuber (Wind River) - [267402] [telnet] "launch shell" takes forever
|
||||
*******************************************************************************/
|
||||
|
||||
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$
|
||||
"linux");//$NON-NLS-1$
|
||||
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
|
||||
fTelnetClient.addOptionHandler(new EchoOptionHandler(false, true,
|
||||
true, true));
|
||||
fTelnetClient.addOptionHandler(new SuppressGAOptionHandler(true,
|
||||
true, true, true));
|
||||
fTelnetClient.addOptionHandler(new TerminalTypeOptionHandler(
|
||||
ptyType, true, true, true, true));
|
||||
fTelnetClient = fSessionProvider.loginTelnetClient(fTelnetClient,
|
||||
new NullProgressMonitor());
|
||||
fOutputStream = fTelnetClient.getOutputStream();
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
* 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) - [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;
|
||||
|
||||
|
@ -49,18 +50,19 @@ public class TerminalShellService extends AbstractShellService {
|
|||
public IHostShell launchShell(String initialWorkingDirectory,
|
||||
String encoding, String[] environment, IProgressMonitor monitor)
|
||||
throws SystemMessageException {
|
||||
ITerminalShell terminalShell = fTerminalService.launchTerminal(null,
|
||||
encoding, environment, initialWorkingDirectory, null, monitor);
|
||||
TerminalServiceHostShell hostShell = new TerminalServiceHostShell(
|
||||
terminalShell, initialWorkingDirectory,
|
||||
TerminalServiceHostShell.SHELL_INVOCATION, environment);
|
||||
return hostShell;
|
||||
return runCommand(initialWorkingDirectory, TerminalServiceHostShell.SHELL_INVOCATION, encoding, environment, monitor);
|
||||
}
|
||||
|
||||
public IHostShell runCommand(String initialWorkingDirectory,
|
||||
String command, String encoding, String[] environment,
|
||||
IProgressMonitor monitor) throws SystemMessageException {
|
||||
ITerminalShell terminalShell = fTerminalService.launchTerminal(null,
|
||||
public IHostShell runCommand(String initialWorkingDirectory, String command, String encoding, String[] environment, IProgressMonitor monitor)
|
||||
throws SystemMessageException {
|
||||
// vt100 is the most common kind of terminal, and default for Telnet
|
||||
// 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);
|
||||
TerminalServiceHostShell hostShell = new TerminalServiceHostShell(
|
||||
terminalShell, initialWorkingDirectory, command, environment);
|
||||
|
@ -95,7 +97,7 @@ public class TerminalShellService extends AbstractShellService {
|
|||
}
|
||||
return o;
|
||||
}
|
||||
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return RSEServicesMessages.TerminalShellService_name;
|
||||
|
|
Loading…
Add table
Reference in a new issue