From a018b78d8c46fc7733d43260718936fdd108f1c5 Mon Sep 17 00:00:00 2001 From: Stefano Lombardo Date: Wed, 22 May 2024 20:55:39 +0200 Subject: [PATCH] test(Git Hub Actions): change logic to spot zombies --- .github/workflows/webserv.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/webserv.yml b/.github/workflows/webserv.yml index a76c917..b06f65f 100644 --- a/.github/workflows/webserv.yml +++ b/.github/workflows/webserv.yml @@ -118,11 +118,11 @@ jobs: fi - name: Check for Zombie Processes run: | - zombies=$(ps aux | grep 'Z' | grep -v grep) + zombies=$(ps aux | awk '$8=="Z" {print $2}') if [ -n "$zombies" ]; then echo " ❌ Zombie processes found:" echo "$zombies" - ps aux | grep 'Z' | grep -v grep + ps aux | awk '$8=="Z"' for pid in $zombies; do parent_pid=$(ps -o ppid= -p $pid) echo "Sending SIGCHLD to parent process PID $parent_pid"