summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 */