From 55b608ce48afc814262fe4d65e0598e4c8acf0fc Mon Sep 17 00:00:00 2001 From: Mikhail Khludnev Date: Tue, 4 Apr 2017 11:01:19 +0300 Subject: [PATCH] SOLR-9745: check exit code only if process has finished --- solr/core/src/java/org/apache/solr/util/SolrCLI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solr/core/src/java/org/apache/solr/util/SolrCLI.java b/solr/core/src/java/org/apache/solr/util/SolrCLI.java index 3572ea43ca6..7be76af6ed1 100644 --- a/solr/core/src/java/org/apache/solr/util/SolrCLI.java +++ b/solr/core/src/java/org/apache/solr/util/SolrCLI.java @@ -2939,7 +2939,7 @@ public class SolrCLI { // safe to ignore ... Thread.interrupted(); } - if (handler.getExitValue() != 0) { + if (handler.hasResult() && handler.getExitValue() != 0) { throw new Exception("Failed to start Solr using command: "+startCmd+" Exception : "+handler.getException()); } } else {