From fedad488d82b188888bb326ef15e2286bed4396a Mon Sep 17 00:00:00 2001 From: William Ma <12377941+williamma12@users.noreply.github.com> Date: Thu, 21 Feb 2019 11:28:26 -0800 Subject: [PATCH] Kills gdb processes with ray stop (#4046) --- python/ray/scripts/scripts.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/python/ray/scripts/scripts.py b/python/ray/scripts/scripts.py index 731445868..3bf312620 100644 --- a/python/ray/scripts/scripts.py +++ b/python/ray/scripts/scripts.py @@ -378,8 +378,29 @@ def start(node_ip_address, redis_address, redis_port, num_redis_shards, @cli.command() def stop(): + # Find the PID of the plasma_store_server process and kill it. subprocess.call( - ["killall plasma_store_server raylet raylet_monitor"], shell=True) + [ + "kill $(ps aux | grep plasma_store_server | grep -v grep | " + "awk '{ print $2 }') 2> /dev/null" + ], + shell=True) + + # Find the PID of the raylet process and kill it. + subprocess.call( + [ + "kill $(ps aux | grep raylet | grep -v grep | " + "awk '{ print $2 }') 2> /dev/null" + ], + shell=True) + + # Find the PID of the raylet_monitor process and kill it. + subprocess.call( + [ + "kill $(ps aux | grep raylet_monitor | grep -v grep | " + "awk '{ print $2 }') 2> /dev/null" + ], + shell=True) # Find the PID of the monitor process and kill it. subprocess.call(