Harald Kirsch created AMQ-6942:
----------------------------------

             Summary: Shell script stop command does not work if PS_FORMAT is 
redefined
                 Key: AMQ-6942
                 URL: https://issues.apache.org/jira/browse/AMQ-6942
             Project: ActiveMQ
          Issue Type: Bug
          Components: Command Line Tools
    Affects Versions: 5.15.3
         Environment: Not sure this is relevant. The problem describe occurs 
because {{PS_FORMAT}} is redefined on the specific machines I am using activemq.

% cat /etc/lsb-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=17.2
DISTRIB_CODENAME=rafaela
DISTRIB_DESCRIPTION="Linux Mint 17.2 Rafaela"
            Reporter: Harald Kirsch


In the command line tool {{activemq}}, line 387 reads
{code:java}
RET="`ps -p "${ACTIVEMQ_PID}"|grep java`"
{code}
This does not work if {{PS_FORMAT}} is redefined. A fix would be to unset 
{{PS_FORMAT}} just before running this line. I just wonder whether this kind of 
test is sensible anyway. It seems to be an attempt to make sure not to kill a 
process that by accident acquired the same pid long after activemq was killed. 
Yet testing for {{java}} is no guarantee either. 

Depending on what the expectation on stability on ill-defined 
Linux/Unix-environments is, one could argue that PS_FORMAT should not be messed 
with. But then it would be good if at least the API-shutdown is tried first and 
only the {{kill}} is not performed if the above grep fails.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to