Ver código fonte

fix: ps -ef to detect defunct pid

Ivan Dyachkov 2 anos atrás
pai
commit
42627a3d42
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      bin/emqx

+ 2 - 2
bin/emqx

@@ -811,8 +811,8 @@ is_down() {
     PID="$1"
     if ps -p "$PID" >/dev/null; then
         # still around
-        # shellcheck disable=SC2009 # this grep pattern is not a part of the progra names
-        if ps -p "$PID" | $GREP -q 'defunct'; then
+        # shellcheck disable=SC2009 # this grep pattern is not a part of the program names
+        if ps -efp "$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")"