Ignore SIGCHLD to prevent zombie processes for non-modal plumbing - sacc - sacc(omys), simple console gopher client HTML git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/sacc/ DIR Log DIR Files DIR Refs DIR Tags DIR LICENSE --- DIR commit b15d084107da05069a3cf70cd81475f26d8e563e DIR parent edbf8409a1e281d17422e7b12b5edd3832b4429d HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 27 Mar 2022 11:47:44 +0200 Ignore SIGCHLD to prevent zombie processes for non-modal plumbing In config.h, when modalplumber = 0 is set (the default), sacc does not wait(2) on the process when a child process exits and it then becomes a zombie on Linux. Diffstat: M sacc.c | 3 +++ 1 file changed, 3 insertions(+), 0 deletions(-) --- DIR diff --git a/sacc.c b/sacc.c @@ -1079,6 +1079,9 @@ setup(void) sigaction(SIGHUP, &sa, NULL); sigaction(SIGTERM, &sa, NULL); + sa.sa_handler = SIG_IGN; + sigaction(SIGCHLD, &sa, NULL); + if (!mkdtemp(tmpdir)) die("mkdir: %s: %s", tmpdir, strerror(errno)); if (interactive = isatty(1)) {