1
0
Fork 0
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:
David McKnight 2006-08-09 15:35:25 +00:00
parent 0a269f743d
commit 14dbab0887
4 changed files with 12 additions and 2 deletions

View file

@ -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()
{

View file

@ -66,6 +66,8 @@ public class DStoreHostShell extends AbstractHostShell implements IHostShell
public void exit()
{
writeToShell("exit");
_stdoutHandler.finish();
_stderrHandler.finish();
}

View file

@ -168,7 +168,7 @@ public abstract class AbstractHostShellOutputReader extends Thread implements I
dispose();
}
}
public void run()
{
while (_keepRunning)

View file

@ -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();
}