Tidying
This commit is contained in:
@@ -99,7 +99,7 @@ void Application::startup() {
|
||||
this->blockAllSignalsOnCurrentThread();
|
||||
this->signalHandlerThread = std::thread(&SignalHandler::run, std::ref(this->signalHandler));
|
||||
|
||||
Logger::info("Selected environment: " + this->selectedEnvironmentName);
|
||||
Logger::info("Selected environment: \"" + this->selectedEnvironmentName + "\"");
|
||||
Logger::debug("Number of environments extracted from config: "
|
||||
+ std::to_string(this->applicationConfig.environments.size()));
|
||||
|
||||
@@ -153,7 +153,10 @@ void Application::shutdown() {
|
||||
// Signal handler is still running
|
||||
this->signalHandler.triggerShutdown();
|
||||
|
||||
// Send meaningless signal to the SignalHandler thread to have it shutdown.
|
||||
/*
|
||||
* Send meaningless signal to the SignalHandler thread to have it shutdown. The signal will pull it out of a
|
||||
* blocking state and allow it to action the shutdown. See SignalHandler::run() for more.
|
||||
*/
|
||||
pthread_kill(this->signalHandlerThread.native_handle(), SIGUSR1);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,10 @@ using namespace Bloom;
|
||||
|
||||
void ApplicationConfig::init(const QJsonObject& jsonObject) {
|
||||
if (!jsonObject.contains("environments")) {
|
||||
throw Exceptions::InvalidConfig("No environments found.");
|
||||
throw Exceptions::InvalidConfig(
|
||||
"No environments found - please review the bloom.json configuration file and ensure that "
|
||||
"no syntax errors are present."
|
||||
);
|
||||
}
|
||||
|
||||
// Extract all environment objects from JSON config.
|
||||
|
||||
@@ -41,7 +41,7 @@ void SignalHandler::startup() {
|
||||
auto signalSet = this->getRegisteredSignalSet();
|
||||
sigprocmask(SIG_SETMASK, &signalSet, NULL);
|
||||
|
||||
// Register handlers here
|
||||
// Register handlers
|
||||
this->handlersMappedBySignalNum.insert(std::pair(
|
||||
SIGINT,
|
||||
std::bind(&SignalHandler::triggerApplicationShutdown, this)
|
||||
|
||||
Reference in New Issue
Block a user