忽略部署脚本defunct进程

This commit is contained in:
wkc
2026-04-01 11:06:53 +08:00
parent f874e2d942
commit 54eabaebd8
3 changed files with 64 additions and 1 deletions

View File

@@ -132,7 +132,7 @@ deploy_frontend_dist() {
collect_backend_pids() {
ps -ef | awk -v marker="$BACKEND_MARKER" -v jar="$BACKEND_JAR_TARGET" '
index($0, marker) > 0 && index($0, jar) > 0 {print $2}
index($0, "<defunct>") == 0 && index($0, marker) > 0 && index($0, jar) > 0 {print $2}
' | xargs 2>/dev/null || true
}