1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Do not try to get the exit value if the session is terminated.

This commit is contained in:
Alain Magloire 2002-08-21 16:02:10 +00:00
parent d5fbd8f312
commit d6695357c3

View file

@ -118,7 +118,8 @@ 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()) {
if (!session.isTerminated()) {
CommandFactory factory = session.getCommandFactory(); CommandFactory factory = session.getCommandFactory();
MIGDBShowExitCode code = factory.createMIGDBShowExitCode(); MIGDBShowExitCode code = factory.createMIGDBShowExitCode();
try { try {
@ -129,6 +130,7 @@ public class MIInferior extends Process {
return 0; return 0;
} }
} }
}
throw new IllegalThreadStateException(); throw new IllegalThreadStateException();
} }