diff options
author | stbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9> | 2016-03-04 18:54:30 +0000 |
---|---|---|
committer | stbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9> | 2016-03-04 18:54:30 +0000 |
commit | a22b126f09c7a75ae6a29149f2209fea7b3c450a (patch) | |
tree | 068ec53b155390dfe3bc5a1c3f43a683083b1d6c | |
parent | 29fbd50a3d0bf2fdf1e6f16dc109274d1102a526 (diff) | |
download | lighttpd-a22b126f09c7a75ae6a29149f2209fea7b3c450a.tar.gz |
[mod_cgi] kill CGI if fail to write request body
(clean up potential zombie processes from unreaped children)
From: Glenn Strauss <gstrauss@gluelogic.com>
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3092 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/mod_cgi.c | 2 |
2 files changed, 3 insertions, 0 deletions
@@ -22,6 +22,7 @@ NEWS * [mod_cgi] send 500 if CGI ends and there is no response (fixes #2542) * [mod_cgi] consolidate CGI cleanup code * [mod_cgi] simplify mod_cgi_handle_subrequest() + * [mod_cgi] kill CGI if fail to write request body - 1.4.39 - 2016-01-02 * [core] fix memset_s call (fixes #2698) diff --git a/src/mod_cgi.c b/src/mod_cgi.c index 78af02ba..d3e02975 100644 --- a/src/mod_cgi.c +++ b/src/mod_cgi.c @@ -1153,6 +1153,8 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer * /* fatal error */ close(from_cgi_fds[0]); close(to_cgi_fds[1]); + kill(pid, SIGTERM); + cgi_pid_add(srv, p, pid); return -1; case -2: /* connection reset */ |