Merge pull request #3695 from cfillion/fix-hyprland-crashes
Fix a crash after handling SIGINT and a data race when initializing the Hyprland workspace modules
This commit is contained in:
@ -107,6 +107,10 @@ int main(int argc, char* argv[]) {
|
||||
ret = client->main(argc, argv);
|
||||
} while (reload);
|
||||
|
||||
std::signal(SIGUSR1, SIG_IGN);
|
||||
std::signal(SIGUSR2, SIG_IGN);
|
||||
std::signal(SIGINT, SIG_IGN);
|
||||
|
||||
delete client;
|
||||
return ret;
|
||||
} catch (const std::exception& e) {
|
||||
|
@ -18,6 +18,9 @@ namespace waybar::modules::hyprland {
|
||||
std::filesystem::path IPC::socketFolder_;
|
||||
|
||||
std::filesystem::path IPC::getSocketFolder(const char* instanceSig) {
|
||||
static std::mutex folderMutex;
|
||||
std::unique_lock lock(folderMutex);
|
||||
|
||||
// socket path, specified by EventManager of Hyprland
|
||||
if (!socketFolder_.empty()) {
|
||||
return socketFolder_;
|
||||
|
Reference in New Issue
Block a user