summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-09-12 11:29:28 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-09-12 11:29:28 +0200
commit1b4362e9a8ece16e37fc6327ad175475a56a6fe5 (patch)
tree797ff5028d91f54383fc3315e32c6aa0ed417af4 /src
parent83555b0c53f0d59f42e9dcfaeb269948e65e0391 (diff)
binding: protect raise(SIGKILL) by getenv
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
Diffstat (limited to 'src')
-rw-r--r--src/afb_binding_api.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/afb_binding_api.cpp b/src/afb_binding_api.cpp
index 41eed13..7554cf0 100644
--- a/src/afb_binding_api.cpp
+++ b/src/afb_binding_api.cpp
@@ -94,8 +94,10 @@ binding_api::result_type binding_api::debug_status() {
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
+ if (getenv("WINMAN_DEBUG_TERMINATE") != nullptr) {
+ raise(SIGKILL); // XXX afb-daemon kills it's pgroup using TERM, which
+ // doesn't play well with perf
+ }
return Ok(json_object_new_object());
}