mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-19 06:05:56 +02:00
[161838] local shell reports isActive() wrong
This commit is contained in:
parent
f1764e6689
commit
9792926712
2 changed files with 14 additions and 4 deletions
|
@ -12,7 +12,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [161838] local shell reports isActive() wrong
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.services.local.shells;
|
package org.eclipse.rse.internal.services.local.shells;
|
||||||
|
@ -52,7 +52,13 @@ public class LocalHostShell extends AbstractHostShell implements IHostShell
|
||||||
*/
|
*/
|
||||||
public boolean isActive()
|
public boolean isActive()
|
||||||
{
|
{
|
||||||
return _shellThread.isAlive();
|
if (_stdoutHandler.isFinished()) {
|
||||||
|
if (_shellThread.isAlive()) {
|
||||||
|
_shellThread.stopThread();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
* Javier Montalvo Orús (Symbian) - 138619: Fix codepage on Win2K
|
* Javier Montalvo Orús (Symbian) - 138619: Fix codepage on Win2K
|
||||||
* Lothar Werzinger (Tradescape) - 161838: Support terminating local shells
|
* Lothar Werzinger (Tradescape) - 161838: Support terminating local shells
|
||||||
* David McKnight (IBM) - [189387] Use specified encoding for shell output
|
* David McKnight (IBM) - [189387] Use specified encoding for shell output
|
||||||
|
* Martin Oberhuber (Wind River) - [161838] local shell reports isActive() wrong
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.services.local.shells;
|
package org.eclipse.rse.internal.services.local.shells;
|
||||||
|
@ -359,7 +360,9 @@ public class LocalShellThread extends Thread
|
||||||
}
|
}
|
||||||
catch (IOException e)
|
catch (IOException e)
|
||||||
{
|
{
|
||||||
System.out.println(e);
|
//MOB: Exception is expected when the process is already dead
|
||||||
|
//System.out.println(e);
|
||||||
|
|
||||||
// make the thread exit;
|
// make the thread exit;
|
||||||
_isShell = false;
|
_isShell = false;
|
||||||
}
|
}
|
||||||
|
@ -381,7 +384,8 @@ public class LocalShellThread extends Thread
|
||||||
}
|
}
|
||||||
catch (InterruptedException e)
|
catch (InterruptedException e)
|
||||||
{
|
{
|
||||||
System.out.println(e);
|
//System.out.println(e);
|
||||||
|
_isCancelled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//This function is where the Threads do real work, and return false when finished
|
//This function is where the Threads do real work, and return false when finished
|
||||||
|
|
Loading…
Add table
Reference in a new issue