From 6d9dd838e439bbc730d12ce81214046cde9227dd Mon Sep 17 00:00:00 2001 From: Nolan Prescott Date: Sun, 7 Feb 2021 00:51:10 -0500 Subject: [PATCH] ignore SIGCHLD to prevent CGI zombies with nothing waiting on the forked processes there is no reason not to reap the CGI process on exit intended to address issue from mailing list "gmnisrv uses too many tasks" <163806E8-A16A-463E-8C62-43E903EF1E35@librem.one> --- src/serve.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/serve.c b/src/serve.c index e891d42..4b63dde 100644 --- a/src/serve.c +++ b/src/serve.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -141,6 +142,7 @@ serve_cgi(struct gmnisrv_client *client, const char *path, return; } + signal(SIGCHLD, SIG_IGN); pid_t pid = fork(); if (pid == -1) { server_error("fork: %s", strerror(errno));