1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 09:46:02 +02:00

Check for terminate first when destroy()

This commit is contained in:
Alain Magloire 2002-08-13 19:54:39 +00:00
parent 9cd17db724
commit e1c79c7850

View file

@ -110,6 +110,7 @@ public class MIProcess extends Process {
* @see java.lang.Process#destroy() * @see java.lang.Process#destroy()
*/ */
public void destroy() { public void destroy() {
if (!isTerminated()) {
CommandFactory factory = session.getCommandFactory(); CommandFactory factory = session.getCommandFactory();
MIExecAbort abort = factory.createMIExecAbort(); MIExecAbort abort = factory.createMIExecAbort();
CLICommand yes = new CLICommand("yes") { CLICommand yes = new CLICommand("yes") {
@ -120,6 +121,7 @@ public class MIProcess extends Process {
session.postCommand(yes); session.postCommand(yes);
} catch (MIException e) { } catch (MIException e) {
} }
}
// Do not wait for answer. // Do not wait for answer.
} }