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) { if (state != ICommandLauncher.COMMAND_CANCELED) {
// check exit status try {
final int exitValue = proc.exitValue(); // check exit status
if (exitValue != 0 && !builtinsDetectionBehavior.suppressErrormessage()) { final int exitValue = proc.waitFor();
// compiler had errors... if (exitValue != 0 && !builtinsDetectionBehavior.suppressErrormessage()) {
String errMsg = String.format(Messages.CompilerBuiltinsDetector_errmsg_command_failed, command, // compiler had errors...
exitValue); String errMsg = String.format(Messages.CompilerBuiltinsDetector_errmsg_command_failed, command,
createMarker(errMsg); exitValue);
createMarker(errMsg);
}
} catch (InterruptedException ex) {
// ignore for now
} }
} }
} else { } else {