fix(core): Catch exit codes

This commit is contained in:
Michael Carlberg 2016-05-24 04:00:01 +02:00
parent a83ecb36db
commit 34832d8cd8
2 changed files with 6 additions and 3 deletions

View File

@ -57,8 +57,10 @@ void EventLoop::stop()
this->state = STATE_STOPPED; this->state = STATE_STOPPED;
// break the input read block - totally how it's meant to be done! // break the input read block - totally how it's meant to be done!
if (!this->pipe_filename.empty()) if (!this->pipe_filename.empty()) {
std::system(("echo >"+this->pipe_filename).c_str()); int status = std::system(("echo >"+this->pipe_filename).c_str());
log_trace(std::to_string(status));
}
this->registry->unload(); this->registry->unload();
this->logger->info("Event loop stopped..."); this->logger->info("Event loop stopped...");

View File

@ -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)) if (cmd.find(EVENT_CLICK) == std::string::npos || cmd.length() <= std::strlen(EVENT_CLICK))
return false; 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; return true;
} }