mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
do not terminate attach processes.
This commit is contained in:
parent
3653983f0e
commit
683b557bd2
1 changed files with 10 additions and 8 deletions
|
@ -28,8 +28,9 @@ public class MIInferior extends Process {
|
||||||
final static int SUSPENDED = 1;
|
final static int SUSPENDED = 1;
|
||||||
final static int RUNNING = 2;
|
final static int RUNNING = 2;
|
||||||
final static int TERMINATED = 4;
|
final static int TERMINATED = 4;
|
||||||
|
final static int ATTACHED = 8;
|
||||||
|
|
||||||
boolean connected = false;
|
boolean attached = false;
|
||||||
|
|
||||||
int state = 0;
|
int state = 0;
|
||||||
|
|
||||||
|
@ -152,7 +153,7 @@ public class MIInferior extends Process {
|
||||||
* @see java.lang.Process#destroy()
|
* @see java.lang.Process#destroy()
|
||||||
*/
|
*/
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
if (!isTerminated()) {
|
if (isAttached() || (((state & ATTACHED) != ATTACHED) && !isTerminated())) {
|
||||||
CommandFactory factory = session.getCommandFactory();
|
CommandFactory factory = session.getCommandFactory();
|
||||||
MIExecAbort abort = factory.createMIExecAbort();
|
MIExecAbort abort = factory.createMIExecAbort();
|
||||||
try {
|
try {
|
||||||
|
@ -196,16 +197,17 @@ public class MIInferior extends Process {
|
||||||
return state == TERMINATED;
|
return state == TERMINATED;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isConnected() {
|
public boolean isAttached() {
|
||||||
return connected;
|
return attached;
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void setConnected() {
|
public synchronized void setAttached() {
|
||||||
connected = true;
|
attached = true;
|
||||||
|
state |= ATTACHED;
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void setDisConnected() {
|
public synchronized void setDetached() {
|
||||||
connected = false;
|
attached = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void setSuspended() {
|
public synchronized void setSuspended() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue