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

Former-commit-id: ff4b0b1f2c1254449e63eb660c1dbd31cef21c3b
This commit is contained in:
Will Stranathan
2014-03-01 07:23:46 -05:00
parent bf3bc83fd8
commit eefc6a5567

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;