mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 06:02:11 +02:00
Do not try to get the exit value if the session is terminated.
This commit is contained in:
parent
d5fbd8f312
commit
d6695357c3
1 changed files with 11 additions and 9 deletions
|
@ -118,15 +118,17 @@ public class MIInferior extends Process {
|
||||||
* @see java.lang.Process#exitValue()
|
* @see java.lang.Process#exitValue()
|
||||||
*/
|
*/
|
||||||
public int exitValue() {
|
public int exitValue() {
|
||||||
if (isTerminated() && !session.isTerminated()) {
|
if (isTerminated()) {
|
||||||
CommandFactory factory = session.getCommandFactory();
|
if (!session.isTerminated()) {
|
||||||
MIGDBShowExitCode code = factory.createMIGDBShowExitCode();
|
CommandFactory factory = session.getCommandFactory();
|
||||||
try {
|
MIGDBShowExitCode code = factory.createMIGDBShowExitCode();
|
||||||
session.postCommand(code);
|
try {
|
||||||
MIGDBShowExitCodeInfo info = code.getMIGDBShowExitCodeInfo();
|
session.postCommand(code);
|
||||||
return info.getCode();
|
MIGDBShowExitCodeInfo info = code.getMIGDBShowExitCodeInfo();
|
||||||
} catch (MIException e) {
|
return info.getCode();
|
||||||
return 0;
|
} catch (MIException e) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new IllegalThreadStateException();
|
throw new IllegalThreadStateException();
|
||||||
|
|
Loading…
Add table
Reference in a new issue