magibney commented on code in PR #867:
URL: https://github.com/apache/solr/pull/867#discussion_r875091635


##########
solr/bin/solr:
##########
@@ -61,6 +61,11 @@ if [ "${THIS_OS:0:6}" == "CYGWIN" ]; then
   echo -e "This script does not support cygwin due to severe limitations and 
lack of adherence\nto BASH standards, such as lack of lsof, curl, and ps 
options.\n\nPlease use the native solr.cmd script on Windows!"
   exit 1
 fi
+# Alpine Linux BusyBox comes with a stripped down ps, make sure we have a 
fully featured one
+if ! ps -p $$ &> /dev/null ; then

Review Comment:
   This gets the job done; a slight change here could also check that the 
output is as expected -- probably unnecessary, but can't hurt; e.g.:
   ```sh
   if [ "$$" != "`ps -o pid='' -p $$`" ]; then
   ```
   Redirecting stdout then becomes unnecessary because it's captured into the 
equality comparison; redirecting stderr could be done, but allowing any error 
messages to print through might actually be preferable, to give more 
system-specific context in addition to the error message we're introducing.



-- 
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