| 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(-)
--- |
| @@ -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)) { |