-
-
Notifications
You must be signed in to change notification settings - Fork 732
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
std::signal is very restrictive about what can be done inside the signal handler. Posix adds some additional functions that are safe to call, but it is still pretty limited. This changes waybar to use the "self pipe trick" where all the signal handler does is write a byte into a pipe, and then we have a slot run on the Gtk main loop that reads from that pipe and actually handles the signal.
- Loading branch information
Showing
1 changed file
with
79 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters