mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 345164: Avoid leaking pipes
This commit is contained in:
parent
323cc9f222
commit
790ba0fc84
2 changed files with 5 additions and 0 deletions
|
@ -314,6 +314,10 @@ public class LaunchUtils {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new DebugException(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, DebugException.REQUEST_FAILED,
|
throw new DebugException(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, DebugException.REQUEST_FAILED,
|
||||||
"Error reading GDB STDOUT after sending: " + cmd, e.getCause()));//$NON-NLS-1$
|
"Error reading GDB STDOUT after sending: " + cmd, e.getCause()));//$NON-NLS-1$
|
||||||
|
} finally {
|
||||||
|
// Cleanup to avoid leaking pipes
|
||||||
|
// Bug 345164
|
||||||
|
process.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
return getGDBVersionFromText(cmdOutput.toString());
|
return getGDBVersionFromText(cmdOutput.toString());
|
||||||
|
|
|
@ -712,6 +712,7 @@ public class GDBBackend extends AbstractDsfService implements IGDBBackend {
|
||||||
getExecutor().submit(
|
getExecutor().submit(
|
||||||
new DsfRunnable() {
|
new DsfRunnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
destroy();
|
||||||
fBackendState = State.TERMINATED;
|
fBackendState = State.TERMINATED;
|
||||||
getSession().dispatchEvent(
|
getSession().dispatchEvent(
|
||||||
new BackendStateChangedEvent(getSession().getId(), getId(), State.TERMINATED),
|
new BackendStateChangedEvent(getSession().getId(), getId(), State.TERMINATED),
|
||||||
|
|
Loading…
Add table
Reference in a new issue