[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tm-cvs-commit] adushistova org.eclipse.tm.rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/terminal SshTerminalShell.java

Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/terminal
In directory dev1:/tmp/cvs-serv16600/src/org/eclipse/rse/internal/services/ssh/terminal

Modified Files:
	SshTerminalShell.java 
Log Message:
[371142] Keep shell alive while there is anything in a pipe.

Index: SshTerminalShell.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/terminal/SshTerminalShell.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** SshTerminalShell.java	31 May 2011 14:07:15 -0000	1.5
--- SshTerminalShell.java	2 May 2012 20:57:25 -0000	1.6
***************
*** 1,4 ****
  /*******************************************************************************
!  * Copyright (c) 2008, 2011 Wind River Systems, Inc. and others.
   * All rights reserved. This program and the accompanying materials
   * are made available under the terms of the Eclipse Public License v1.0
--- 1,4 ----
  /*******************************************************************************
!  * Copyright (c) 2008, 2012 Wind River Systems, Inc. and others.
   * All rights reserved. This program and the accompanying materials
   * are made available under the terms of the Eclipse Public License v1.0
***************
*** 12,15 ****
--- 12,16 ----
   * Yufen Kuo        (MontaVista)      - [274153] Fix pipe closed with RSE
   * Anna Dushistova  (Mentor Graphics) - Returned "session lost" handling to isActive()
+  * Anna Dushistova  (MontaVista)      - [371142] [shells][terminals] Keep shell alive while there is anything in a pipe
   *******************************************************************************/
  
***************
*** 217,221 ****
  
  	 public boolean isActive() {
! 		if (fChannel != null && !fChannel.isEOF()) {
  			return true;
  		}
--- 218,228 ----
  
  	 public boolean isActive() {
! 		 boolean hasInput = false;
! 		 try {
! 			hasInput = getInputStream().available() > 0;
! 		} catch (IOException e) {
! 			// Do nothing since we are just polling
! 		}
! 		if (fChannel != null && (!fChannel.isEOF() || hasInput)) {
  			return true;
  		}