You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Harald Kirsch (JIRA)" <ji...@apache.org> on 2018/03/31 12:42:00 UTC
[jira] [Created] (AMQ-6942) Shell script stop command does not work
if PS_FORMAT is redefined
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)