diff options
author | Luciano Resende <lresende@apache.org> | 2017-01-24 10:54:06 -0800 |
---|---|---|
committer | Luciano Resende <lresende@apache.org> | 2017-01-24 10:54:06 -0800 |
commit | f39ec3fc562a080f41b52e5a7adb87974388adc4 (patch) | |
tree | 178d4fb3cef86ab1571b8c95721ed91a0fa82c67 /python/toree_manager.py | |
parent | 85a63e371332192b643f1f8428b36aa9148b85cd (diff) | |
download | toree-gateway-f39ec3fc562a080f41b52e5a7adb87974388adc4.tar.gz toree-gateway-f39ec3fc562a080f41b52e5a7adb87974388adc4.tar.bz2 toree-gateway-f39ec3fc562a080f41b52e5a7adb87974388adc4.zip |
Properly kill remote Toree process
Diffstat (limited to 'python/toree_manager.py')
-rw-r--r-- | python/toree_manager.py | 7 |
1 files changed, 6 insertions, 1 deletions
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: |