summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2022-03-28 18:01:22 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2022-03-28 18:01:22 +0200
commita58fa45f25da4f18d7b8c1a815884f67b965406f (patch)
tree57f6324c4c85f31889a7fded4dde97cc58702754
parent30a70fa2dab1925b0eaea04f67e3f86b360386dd (diff)
sfeed_curses: fix-up from previous commit: properly initialize struct sigaction
-rw-r--r--sfeed_curses.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sfeed_curses.c b/sfeed_curses.c
index 00189a0..abd6740 100644
--- a/sfeed_curses.c
+++ b/sfeed_curses.c
@@ -566,11 +566,12 @@ processexit(pid_t pid, int interactive)
pid_t wpid;
struct sigaction sa;
+ memset(&sa, 0, sizeof(sa));
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = SA_RESTART; /* require BSD signal semantics */
+
if (interactive) {
/* ignore SIGINT (^C) in parent for interactive applications */
- memset(&sa, 0, sizeof(sa));
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = SA_RESTART; /* require BSD signal semantics */
sa.sa_handler = SIG_IGN;
sigaction(SIGINT, &sa, NULL);
/* wait for process to change state */