diff options
Diffstat (limited to 'tests/dmm/dmm_scripts/kill_given_proc.sh')
-rwxr-xr-x | tests/dmm/dmm_scripts/kill_given_proc.sh | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/tests/dmm/dmm_scripts/kill_given_proc.sh b/tests/dmm/dmm_scripts/kill_given_proc.sh deleted file mode 100755 index 772643a316..0000000000 --- a/tests/dmm/dmm_scripts/kill_given_proc.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -proc_name=$1 -sudo pgrep $proc_name -if [ $? -eq "0" ]; then - success=false - sudo pkill $proc_name - echo "RC = $?" - for attempt in {1..5}; do - echo "Checking if '$proc_name' is still alive, attempt nr ${attempt}" - sudo pgrep $proc_name - if [ $? -eq "1" ]; then - echo "'$proc_name' is dead" - success=true - break - fi - echo "'$proc_name' is still alive, waiting 1 second" - sleep 1 - done - if [ "$success" = false ]; then - echo "The command sudo pkill '$proc_name' failed" - sudo pkill -9 $proc_name - echo "RC = $?" - exit 1 - fi -else - echo "'$proc_name' is not running" -fi - -sleep 2 -exit 0
\ No newline at end of file |