From 34832d8cd838fc37e374a8ca86db095242b09a51 Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Tue, 24 May 2016 04:00:01 +0200 Subject: [PATCH] fix(core): Catch exit codes --- src/eventloop.cpp | 6 ++++-- src/modules/bspwm.cpp | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/eventloop.cpp b/src/eventloop.cpp index a9297502..92f538cc 100644 --- a/src/eventloop.cpp +++ b/src/eventloop.cpp @@ -57,8 +57,10 @@ void EventLoop::stop() this->state = STATE_STOPPED; // break the input read block - totally how it's meant to be done! - if (!this->pipe_filename.empty()) - std::system(("echo >"+this->pipe_filename).c_str()); + if (!this->pipe_filename.empty()) { + int status = std::system(("echo >"+this->pipe_filename).c_str()); + log_trace(std::to_string(status)); + } this->registry->unload(); this->logger->info("Event loop stopped..."); diff --git a/src/modules/bspwm.cpp b/src/modules/bspwm.cpp index 98250bc0..949fa5d4 100644 --- a/src/modules/bspwm.cpp +++ b/src/modules/bspwm.cpp @@ -217,7 +217,8 @@ bool BspwmModule::handle_command(const std::string& cmd) if (cmd.find(EVENT_CLICK) == std::string::npos || cmd.length() <= std::strlen(EVENT_CLICK)) return false; - std::system(("bspc desktop -f "+ this->monitor +":^"+ cmd.substr(std::strlen(EVENT_CLICK))).c_str()); + int status = std::system(("bspc desktop -f "+ this->monitor +":^"+ cmd.substr(std::strlen(EVENT_CLICK))).c_str()); + log_trace(std::to_string(status)); return true; }