From f39ec3fc562a080f41b52e5a7adb87974388adc4 Mon Sep 17 00:00:00 2001 From: Luciano Resende Date: Tue, 24 Jan 2017 10:54:06 -0800 Subject: Properly kill remote Toree process --- python/toree_manager.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python/toree_manager.py b/python/toree_manager.py index 9f1e9d4..f7f049d 100644 --- a/python/toree_manager.py +++ b/python/toree_manager.py @@ -108,6 +108,8 @@ class ToreeManager: for line in stdout: pid = line.strip() + print('Toree pid: ' + pid) + profile.updatePid(pid) except SSHException as e: @@ -146,13 +148,16 @@ class ToreeManager: stderr = channel.makefile_stderr('r') command = ''' - kill -9 {} + kill -9 {} && + exit '''.format(profile.pid()) print(command) stdin.write(command) + print(stdout.read()) + except timeout: print('caught a timeout') finally: -- cgit v1.2.3