From 8cd840e49ad293ece796d32db87d4b1980502cf3 Mon Sep 17 00:00:00 2001 From: Marcus Fritzsch Date: Fri, 28 Jul 2017 15:43:47 +0200 Subject: app: add debug_terminate() event, quick hack to terminate Signed-off-by: Marcus Fritzsch --- src/app.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/app.cpp b/src/app.cpp index 255a64a..5ff8729 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -18,6 +18,8 @@ #include #include +#include +#include namespace wm { @@ -282,6 +284,12 @@ binding_api::result_type binding_api::debug_status() { return Ok(jr); } +binding_api::result_type binding_api::debug_terminate() { + logdebug("%s", __func__); + raise(SIGKILL); // XXX afb-daemon kills it's pgroup using TERM, which doesn't play well with perf + return Ok(json_object_new_object()); +} + // _ _ _ _ _ // ___ ___ _ __ | |_ _ __ ___ | | | ___ _ __ | |__ ___ ___ | | _____ // / __/ _ \| '_ \| __| '__/ _ \| | |/ _ \ '__|| '_ \ / _ \ / _ \| |/ / __| -- cgit 1.2.3-korg