aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/terminal.c b/terminal.c
index 66c523df..f6d8f814 100644
--- a/terminal.c
+++ b/terminal.c
@@ -1716,7 +1716,9 @@ term_destroy(struct terminal *term)
* course only applies to a 'foot --server' instance, where
* there might be other terminals running.
*/
- sigaction(SIGALRM, &(const struct sigaction){.sa_handler = &sig_alarm}, NULL);
+ struct sigaction action = {.sa_handler = &sig_alarm};
+ sigemptyset(&action.sa_mask);
+ sigaction(SIGALRM, &action, NULL);
alarm(60);
while (true) {
@@ -1740,7 +1742,8 @@ term_destroy(struct terminal *term)
/* Cancel alarm */
alarm(0);
- sigaction(SIGALRM, &(const struct sigaction){.sa_handler = SIG_DFL}, NULL);
+ action.sa_handler = SIG_DFL;
+ sigaction(SIGALRM, &action, NULL);
}
ret = EXIT_FAILURE;