fix(bin/emqx): remove `ps` `-e` opt, as it lists all processes regardless of `-p <pid>`
This commit is contained in:
parent
9b3f88aeeb
commit
6dd9e54ab8
2
bin/emqx
2
bin/emqx
|
@ -812,7 +812,7 @@ is_down() {
|
||||||
if ps -p "$PID" >/dev/null; then
|
if ps -p "$PID" >/dev/null; then
|
||||||
# still around
|
# still around
|
||||||
# shellcheck disable=SC2009 # this grep pattern is not a part of the program names
|
# 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
|
# zombie state, print parent pid
|
||||||
parent="$(ps -o ppid= -p "$PID" | tr -d ' ')"
|
parent="$(ps -o ppid= -p "$PID" | tr -d ' ')"
|
||||||
logwarn "$PID is marked <defunct>, parent: $(ps -p "$parent")"
|
logwarn "$PID is marked <defunct>, parent: $(ps -p "$parent")"
|
||||||
|
|
Loading…
Reference in New Issue