From d3fbddb1913a08f625a27eb563712fd50bfd07af Mon Sep 17 00:00:00 2001 From: apio Date: Wed, 31 Jul 2024 19:46:02 +0200 Subject: [PATCH] taskbar: Use SIGQUIT to restart Whenever a GUI session ends, SIGHUP is sent to all GUI processes. Previously, taskbar would catch this signal and wrongly restart. Now, taskbar correctly dies alongside everyone else. --- gui/apps/taskbar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/apps/taskbar.cpp b/gui/apps/taskbar.cpp index 18f273a3..a40ee0f3 100644 --- a/gui/apps/taskbar.cpp +++ b/gui/apps/taskbar.cpp @@ -23,7 +23,7 @@ void sigchld_handler(int) wait(nullptr); } -void sighup_handler(int) +void sigquit_handler(int) { // Reload the taskbar by exec-ing the executable, resetting everything. StringView args[] = { "/usr/bin/taskbar" }; @@ -151,7 +151,7 @@ Result luna_main(int, char**) TRY(app.init("/tmp/wsys.sock")); TRY(os::EventLoop::the().register_signal_handler(SIGCHLD, sigchld_handler)); - TRY(os::EventLoop::the().register_signal_handler(SIGHUP, sighup_handler)); + TRY(os::EventLoop::the().register_signal_handler(SIGQUIT, sigquit_handler)); launcher_client = TRY(os::IPC::Client::connect("/tmp/launch.sock", false));