Introduction
Introduction Statistics Contact Development Disclaimer Help
Ignore SIGCHLD to prevent zombie processes for non-modal plumbing - sacc - sacc…
git clone git://git.codemadness.org/sacc
Log
Files
Refs
LICENSE
---
commit b15d084107da05069a3cf70cd81475f26d8e563e
parent edbf8409a1e281d17422e7b12b5edd3832b4429d
Author: Hiltjo Posthuma <[email protected]>
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(-)
---
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)) {
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.