colvinco commented on code in PR #1328:
URL: https://github.com/apache/solr/pull/1328#discussion_r1096105477


##########
solr/bin/solr:
##########
@@ -2312,13 +2341,13 @@ function start_solr() {
        echo ""
     fi
     # no lsof on cygwin though
-    if lsof -v 2>&1 | grep -q revision; then
+    if [ -n "$(get_port_tool)" ]; then
       echo -n "Waiting up to $SOLR_START_WAIT seconds to see Solr running on 
port $SOLR_PORT"
       # Launch in a subshell to show the spinner
       (loops=0
       while true
       do
-        running=$(lsof -t -PniTCP:$SOLR_PORT -sTCP:LISTEN || :)
+        running=$(check_port_in_use $SOLR_PORT)

Review Comment:
   > if lost doesn't exist
   
   Sorry do you mean if `lsof` doesn't exist?
   With these changes, `command -v` will already have been used to check if 
lsof / ss / netstat is available, and this won't be called if they aren't, it 
will already have branched to 
https://github.com/apache/solr/blob/dcb7d2406b574e24fa8636cf717a8af2039c79b4/solr/bin/solr#L2369



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to