Commit 5a3b9fc8 authored by Valentin Reis's avatar Valentin Reis
Browse files

[fix] Sending a raw 'kill' message to upstream when `cmd` receives SIGINT

`cmd` now sends a container kill message to the upstream api and exits
whenever it receives SIGINT, via C-c for instance.
parent ec503ffa
...@@ -26,11 +26,16 @@ class CommandLineInterface(object): ...@@ -26,11 +26,16 @@ class CommandLineInterface(object):
if uuid: if uuid:"received signal %d, killing the application..","received signal %d, killing the application..",
signum) signum)
self.do_kill(KillArgs(uuid)) command = {'api': 'up_rpc_req',"killed the application.", signum) 'type': 'kill',
'container_uuid': uuid
msg = RPC_MSG['kill'](**command)
self.client.sendmsg(msg)"killed the application, exiting.")
else: else:"received signal %d, exiting", signum)"received signal %d, exiting", signum)
exit(1) exit(130)
def setup(self): def setup(self):
# upstream RPC port # upstream RPC port
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment