mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
client: register signal handler for SIGTERM too
This commit is contained in:
parent
438d6eaff0
commit
2544e93c0e
1 changed files with 2 additions and 1 deletions
3
client.c
3
client.c
|
|
@ -130,7 +130,8 @@ main(int argc, char *const *argv)
|
|||
}
|
||||
}
|
||||
|
||||
if (sigaction(SIGINT, &(struct sigaction){.sa_handler = &sig_handler}, NULL) < 0) {
|
||||
const struct sigaction sa = {.sa_handler = &sig_handler};
|
||||
if (sigaction(SIGINT, &sa, NULL) < 0 || sigaction(SIGTERM, &sa, NULL) < 0) {
|
||||
LOG_ERRNO("failed to register signal handlers");
|
||||
goto err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue