From ad25d445f2bc7370a04ce142cb262c22a037df75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20MARQUET?= <72651575+BreizhHardware@users.noreply.github.com> Date: Thu, 11 Apr 2024 14:46:16 +0000 Subject: [PATCH] Kill the sockerServer in last (1sec after the other) --- startup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/startup.sh b/startup.sh index 52a23b2..e2b645c 100644 --- a/startup.sh +++ b/startup.sh @@ -34,7 +34,9 @@ monitor_all() { for pid in $pids; do if ps -p $pid > /dev/null; then echo "Program with PID $pid has terminated, stopping other programs" - pkill -P $$ -f "socketServer|lidar|arucoDetector|ihm_robot" + pkill -P $$ -f "lidar|arucoDetector|ihm_robot" + sleep 1 + pkill -P && -f "socketServer" break fi done