Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runmqserver: fix/improve verifySingleProcess #420

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Sep 2, 2020

  1. cmd/runmqserver.verifySingleProcess: optimize

    Instead of using `ps`, which reads three `/proc` files per each process
    (`stat`, `status`, and `cmdline`), use `pgrep` which only reads cmdline.
    
    Also, `pgrep` output is simpler -- it only lists PIDs, one per line,
    so to find out the number of processes we just need to count newlines.
    
    Signed-off-by: Kir Kolyshkin <[email protected]>
    kolyshkin committed Sep 2, 2020
    Configuration menu
    Copy the full SHA
    223949d View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2020

  1. cmd/runmqserver.verifySingleProcess: improve

    1. Check command.Run error, print it out (as debug only).
    
    2. Simplify verifyOnlyOne() return values (bool is enough).
    
    3. Add more logging.
    
    Signed-off-by: Kir Kolyshkin <[email protected]>
    kolyshkin committed Sep 3, 2020
    Configuration menu
    Copy the full SHA
    ade018e View commit details
    Browse the repository at this point in the history