mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 15:15:25 +02:00
fix for 153001 - need to terminate shell output reader
This commit is contained in:
parent
0a269f743d
commit
14dbab0887
4 changed files with 12 additions and 2 deletions
|
@ -31,6 +31,7 @@ public class DStoreShellOutputReader extends AbstractHostShellOutputReader imple
|
|||
public DStoreShellOutputReader(IHostShell hostShell, DataElement status, boolean isErrorReader)
|
||||
{
|
||||
super(hostShell, isErrorReader);
|
||||
setName("DStoreShellOutputReader"+getName());
|
||||
_status = status;
|
||||
if (status != null)
|
||||
{
|
||||
|
@ -46,7 +47,7 @@ public class DStoreShellOutputReader extends AbstractHostShellOutputReader imple
|
|||
|
||||
protected Object internalReadLine()
|
||||
{
|
||||
if (_status != null)
|
||||
if (_status != null && _keepRunning)
|
||||
{
|
||||
int newSize = _status.getNestedSize();
|
||||
while (newSize > _statusOffset)
|
||||
|
@ -136,6 +137,12 @@ public class DStoreShellOutputReader extends AbstractHostShellOutputReader imple
|
|||
}
|
||||
}
|
||||
|
||||
public void finish()
|
||||
{
|
||||
super.finish();
|
||||
notifyResponse();
|
||||
}
|
||||
|
||||
/*
|
||||
private void handleInput()
|
||||
{
|
||||
|
|
|
@ -66,6 +66,8 @@ public class DStoreHostShell extends AbstractHostShell implements IHostShell
|
|||
public void exit()
|
||||
{
|
||||
writeToShell("exit");
|
||||
_stdoutHandler.finish();
|
||||
_stderrHandler.finish();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ public abstract class AbstractHostShellOutputReader extends Thread implements I
|
|||
dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void run()
|
||||
{
|
||||
while (_keepRunning)
|
||||
|
|
|
@ -22,4 +22,5 @@ public interface IHostShellOutputReader extends IHostShellOutputNotifier
|
|||
public Object readLine(int index);
|
||||
public void addOutputListener(IHostShellOutputListener listener);
|
||||
public boolean isErrorReader();
|
||||
public void finish();
|
||||
}
|
Loading…
Add table
Reference in a new issue