This is an automated email from the ASF dual-hosted git repository.

jbertram pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git

commit 9bb19f6eb0a480abfb56879cfaa86c4f117c8c82
Author: Justin Bertram <jbert...@apache.org>
AuthorDate: Tue Feb 6 11:02:55 2024 -0600

    Revert "ARTEMIS-4630 Validate if the pid is really from Artemis"
    
    This reverts commit 7ac6f4e99cc8349b378b4ae9d9ecc0970ac5b2b4.
---
 .../org/apache/activemq/artemis/cli/commands/bin/artemis-service    | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git 
a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service
 
b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service
index e412647374..491f881a29 100755
--- 
a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service
+++ 
b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service
@@ -59,13 +59,9 @@ fi
 status() {
   if [ -f "${PID_FILE}" ] ; then
     pid=`cat "${PID_FILE}"`
-    pid_workdir=$ARTEMIS_INSTANCE
-    if [ `command -v lsof &> /dev/null` ]; then
-      pid_workdir="`lsof -a -d cwd -p ${pid} | awk '{print $9}' | tail -1`"
-    if
     # check to see if it's gone...
     ps -p ${pid} > /dev/null
-    if [ $? -eq 0 ] && [ "$pid_workdir" = "$ARTEMIS_INSTANCE" ]; then
+    if [ $? -eq 0 ] ; then
       return 0
     else
       rm "${PID_FILE}"

Reply via email to