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.
This commit is contained in:
apio 2024-07-31 19:46:02 +02:00
parent 0ab8efd405
commit d3fbddb191
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

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