From 302712853b5fe1a037180134e183265b3dcdc979 Mon Sep 17 00:00:00 2001 From: Felix Lohmeier Date: Thu, 25 Feb 2021 14:19:07 +0100 Subject: [PATCH] :bug: wait until process is killed and port is free again --- Taskfile.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Taskfile.yml b/Taskfile.yml index 5bcf63e..125b1a3 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -87,7 +87,9 @@ tasks: dir: ./{{.DIR}} cmds: - | # shut down OpenRefine immediately to save time and disk space - kill -9 $(lsof -t -i:{{.PORT}}) + PID=$(lsof -t -i:{{.PORT}}) + kill -9 $PID + while ps -p $PID > /dev/null; do sleep 1; done - rm -rf ./*.project* workspace.json # delete temporary files check: