Fixed regression with QT catching UNIX signals before SignalHandler

This commit is contained in:
Nav
2023-05-29 23:24:09 +01:00
parent 659b3c3679
commit 38989ae300
2 changed files with 2 additions and 2 deletions

View File

@@ -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 + "\"");

View File

@@ -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);