diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2022-03-28 18:01:22 +0200 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2022-03-28 18:01:22 +0200 |
commit | a58fa45f25da4f18d7b8c1a815884f67b965406f (patch) | |
tree | 57f6324c4c85f31889a7fded4dde97cc58702754 | |
parent | 30a70fa2dab1925b0eaea04f67e3f86b360386dd (diff) |
sfeed_curses: fix-up from previous commit: properly initialize struct sigaction
-rw-r--r-- | sfeed_curses.c | 7 |
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 */ |