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
|
|
@ -102,7 +102,8 @@ int main(int argc, char **argv) {
|
|||
sway_log(SWAY_DEBUG, "\t[%s] `%s`", button->text, button->action);
|
||||
}
|
||||
|
||||
signal(SIGTERM, sig_handler);
|
||||
struct sigaction sa = { .sa_handler = sig_handler };
|
||||
sigaction(SIGTERM, &sa, NULL);
|
||||
|
||||
swaynag_setup(&swaynag);
|
||||
swaynag_run(&swaynag);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue