Fixed regression with QT catching UNIX signals before SignalHandler
This commit is contained in:
@@ -23,6 +23,7 @@ namespace Bloom
|
|||||||
: arguments(std::move(arguments))
|
: arguments(std::move(arguments))
|
||||||
, qtApplication(
|
, qtApplication(
|
||||||
(
|
(
|
||||||
|
Thread::blockAllSignals(),
|
||||||
QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true),
|
QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true),
|
||||||
#ifndef BLOOM_DEBUG_BUILD
|
#ifndef BLOOM_DEBUG_BUILD
|
||||||
QCoreApplication::addLibraryPath(QString::fromStdString(Services::PathService::applicationDirPath() + "/plugins")),
|
QCoreApplication::addLibraryPath(QString::fromStdString(Services::PathService::applicationDirPath() + "/plugins")),
|
||||||
@@ -137,7 +138,6 @@ namespace Bloom
|
|||||||
|
|
||||||
Logger::debug("Bloom version: " + Application::VERSION.toString());
|
Logger::debug("Bloom version: " + Application::VERSION.toString());
|
||||||
|
|
||||||
this->blockAllSignals();
|
|
||||||
this->startSignalHandler();
|
this->startSignalHandler();
|
||||||
|
|
||||||
Logger::info("Selected environment: \"" + this->selectedEnvironmentName + "\"");
|
Logger::info("Selected environment: \"" + this->selectedEnvironmentName + "\"");
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ namespace Bloom
|
|||||||
/**
|
/**
|
||||||
* Disables signal interrupts on current thread.
|
* Disables signal interrupts on current thread.
|
||||||
*/
|
*/
|
||||||
void blockAllSignals() {
|
static void blockAllSignals() {
|
||||||
sigset_t set = {};
|
sigset_t set = {};
|
||||||
sigfillset(&set);
|
sigfillset(&set);
|
||||||
sigprocmask(SIG_SETMASK, &set, NULL);
|
sigprocmask(SIG_SETMASK, &set, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user