mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix for PR 60664
This commit is contained in:
parent
ee00ba1b15
commit
21b56220d7
2 changed files with 16 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2004-05-07 Alain Magloire
|
||||||
|
|
||||||
|
Patch from Keith Rolling(Palm Source).
|
||||||
|
PR 60664
|
||||||
|
* src/org/eclipse/cdt/debug/mi/core/MIInferior.java
|
||||||
|
|
||||||
2004-04-01 Alain Magloire
|
2004-04-01 Alain Magloire
|
||||||
|
|
||||||
GDBServer configuration should be "*" not "native"
|
GDBServer configuration should be "*" not "native"
|
||||||
|
|
|
@ -17,7 +17,6 @@ import org.eclipse.cdt.debug.mi.core.command.MIGDBShowExitCode;
|
||||||
import org.eclipse.cdt.debug.mi.core.command.MIInfoProgram;
|
import org.eclipse.cdt.debug.mi.core.command.MIInfoProgram;
|
||||||
import org.eclipse.cdt.debug.mi.core.event.MIInferiorExitEvent;
|
import org.eclipse.cdt.debug.mi.core.event.MIInferiorExitEvent;
|
||||||
import org.eclipse.cdt.debug.mi.core.output.MIGDBShowExitCodeInfo;
|
import org.eclipse.cdt.debug.mi.core.output.MIGDBShowExitCodeInfo;
|
||||||
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
|
||||||
import org.eclipse.cdt.debug.mi.core.output.MIInfoProgramInfo;
|
import org.eclipse.cdt.debug.mi.core.output.MIInfoProgramInfo;
|
||||||
import org.eclipse.cdt.utils.pty.PTY;
|
import org.eclipse.cdt.utils.pty.PTY;
|
||||||
import org.eclipse.cdt.utils.spawner.Spawner;
|
import org.eclipse.cdt.utils.spawner.Spawner;
|
||||||
|
@ -109,13 +108,17 @@ public class MIInferior extends Process {
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public synchronized void waitForSync() throws InterruptedException {
|
||||||
|
while (state != TERMINATED) {
|
||||||
|
wait();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see java.lang.Process#waitFor()
|
* @see java.lang.Process#waitFor()
|
||||||
*/
|
*/
|
||||||
public synchronized int waitFor() throws InterruptedException {
|
public int waitFor() throws InterruptedException {
|
||||||
while (state != TERMINATED) {
|
waitForSync();
|
||||||
wait();
|
|
||||||
}
|
|
||||||
return exitValue();
|
return exitValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,7 +183,8 @@ public class MIInferior extends Process {
|
||||||
if (interrupt != null) {
|
if (interrupt != null) {
|
||||||
try {
|
try {
|
||||||
session.postCommand(interrupt);
|
session.postCommand(interrupt);
|
||||||
MIInfo info = interrupt.getMIInfo();
|
// call getMIInfo() even if we discard the value;
|
||||||
|
interrupt.getMIInfo();
|
||||||
// Allow (5 secs) for the interrupt to propagate.
|
// Allow (5 secs) for the interrupt to propagate.
|
||||||
for (int i = 0;(state == RUNNING) && i < 5; i++) {
|
for (int i = 0;(state == RUNNING) && i < 5; i++) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Reference in a new issue