zhanglingzhe0820 commented on a change in pull request #1955:
URL: https://github.com/apache/iotdb/pull/1955#discussion_r518024074



##########
File path: server/src/assembly/resources/sbin/stop-server.sh
##########
@@ -21,10 +21,14 @@
 
 IOTDB_CONF="`dirname "$0"`/../conf"
 rpc_port=`sed '/^rpc_port=/!d;s/.*=//' ${IOTDB_CONF}/iotdb-engine.properties`
-PID=$(lsof -t -i:${rpc_port})
-
-if [ "$PID" = "" ]; then
+if type lsof > /dev/null; then
+  PID=$(lsof -t -i:${rpc_port})
+else

Review comment:
       why not just use "ps ax..." as 'lsof' does not exist in most operating 
system




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to