mirror of
https://github.com/swaywm/sway.git
synced 2025-10-29 05:40:18 -04:00
Replace signal() with sigaction()
The man page for signal(3) reads: > new applications should use sigaction() rather than signal()
This commit is contained in:
parent
0e19d85d37
commit
38a42f97d4
3 changed files with 12 additions and 8 deletions
|
|
@ -93,8 +93,9 @@ int main(int argc, char **argv) {
|
|||
|
||||
free(socket_path);
|
||||
|
||||
signal(SIGINT, sig_handler);
|
||||
signal(SIGTERM, sig_handler);
|
||||
struct sigaction sa = { .sa_handler = sig_handler };
|
||||
sigaction(SIGINT, &sa, NULL);
|
||||
sigaction(SIGTERM, &sa, NULL);
|
||||
|
||||
swaybar.running = true;
|
||||
bar_run(&swaybar);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue