Added proper waitfor to the process. Need to add a watchdog to this

Former-commit-id: 51bea69bb73e379fa7aac776171110fa1f75b8d4
This commit is contained in:
Will Stranathan
2014-03-01 07:23:46 -05:00
parent be68f8c3f7
commit 887a5d50a4

View File

@@ -200,7 +200,7 @@ public class AssemblyAnalyzer extends AbstractAnalyzer {
final Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(p.getInputStream());
final XPath xpath = XPathFactory.newInstance().newXPath();
final String error = xpath.evaluate("/assembly/error", doc);
if (p.exitValue() != 1 || error == null || "".equals(error)) {
if (p.waitFor() != 1 || error == null || "".equals(error)) {
LOG.warning("An error occured with the .NET AssemblyAnalyzer, please see the log for more details.");
LOG.fine("GrokAssembly.exe is not working properly");
grokAssemblyExe = null;