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

[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):
if uuid:
logger.info("received signal %d, killing the application..",
signum)
self.do_kill(KillArgs(uuid))
logger.info("killed the application.", signum)
command = {'api': 'up_rpc_req',
'type': 'kill',
'container_uuid': uuid
}
msg = RPC_MSG['kill'](**command)
self.client.sendmsg(msg)
logger.info("killed the application, exiting.")
else:
logger.info("received signal %d, exiting", signum)
exit(1)
exit(130)
def setup(self):
# 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