fix(bin/emqx): remove ps -e opt, as it lists all processes regardless of -p <pid>

This commit is contained in:
Serge Tupchii 2023-09-08 13:43:12 +03:00
parent 9b3f88aeeb
commit 6dd9e54ab8

View File

@ -812,7 +812,7 @@ is_down() {
if ps -p "$PID" >/dev/null; then
# still around
# shellcheck disable=SC2009 # this grep pattern is not a part of the program names
if ps -efp "$PID" | $GREP -q 'defunct'; then
if ps -fp "$PID" | $GREP -q 'defunct'; then
# zombie state, print parent pid
parent="$(ps -o ppid= -p "$PID" | tr -d ' ')"
logwarn "$PID is marked <defunct>, parent: $(ps -p "$parent")"