Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-6942

Shell script stop command does not work if PS_FORMAT is redefined

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 5.15.3
    • None
    • Command Line Tools
    • None

    Description

      In the command line tool activemq, line 387 reads

      RET="`ps -p "${ACTIVEMQ_PID}"|grep java`"
      

      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.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            haraldk Harald Kirsch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: