1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 580045 - Spurious java.lang.IllegalThreadStateException: Process not Terminated in o.e.c.jsoncdb.core.CompileCommandsJsonParser

Signed-off-by: Martin Weber <fifteenknots505@gmail.com>

Change-Id: I898b07dca92f47ec7315da3380231b818349139c
This commit is contained in:
Martin Weber 2022-05-30 22:45:04 +02:00
parent 133c81e979
commit d01a15f013

View file

@ -130,13 +130,17 @@ public class CompilerBuiltinsDetector {
}
}
if (state != ICommandLauncher.COMMAND_CANCELED) {
// check exit status
final int exitValue = proc.exitValue();
if (exitValue != 0 && !builtinsDetectionBehavior.suppressErrormessage()) {
// compiler had errors...
String errMsg = String.format(Messages.CompilerBuiltinsDetector_errmsg_command_failed, command,
exitValue);
createMarker(errMsg);
try {
// check exit status
final int exitValue = proc.waitFor();
if (exitValue != 0 && !builtinsDetectionBehavior.suppressErrormessage()) {
// compiler had errors...
String errMsg = String.format(Messages.CompilerBuiltinsDetector_errmsg_command_failed, command,
exitValue);
createMarker(errMsg);
}
} catch (InterruptedException ex) {
// ignore for now
}
}
} else {