well,
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 0s

This commit is contained in:
hogweed1
2026-11-10 02:23:08 +10:00
parent 064c1db460
commit 04bbf4ae08

View File

@@ -9,11 +9,22 @@
continue continue
fi fi
# Если родитель PID 1 — уничтожаем
if [ "$(ps -o ppid= -p "$pid" 2>/dev/null | tr -d ' ')" -eq 1 ]; then
kill -9 "$pid" 2>/dev/null
fi
done
pgrep -f gitstatusd | while read -r pid; do
# Пропускаем себя, чтобы не убить текущую сессию
if [ "$pid" -eq "$CURRENT_PID" ]; then
continue
fi
# Если родитель PID 1 — уничтожаем # Если родитель PID 1 — уничтожаем
if [ "$(ps -o ppid= -p "$pid" 2>/dev/null | tr -d ' ')" -eq 1 ]; then if [ "$(ps -o ppid= -p "$pid" 2>/dev/null | tr -d ' ')" -eq 1 ]; then
kill -9 "$pid" 2>/dev/null kill -9 "$pid" 2>/dev/null
fi fi
done done
) #& ) &
#pgrep -f zsh | xargs -I {} sh -c 'if [ "$(ps -o ppid= -p {})" -eq 1 ]; then kill {}; fi' #pgrep -f zsh | xargs -I {} sh -c 'if [ "$(ps -o ppid= -p {})" -eq 1 ]; then kill {}; fi'