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:
parent
0ab8efd405
commit
d3fbddb191
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user