summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--uhttpd-cgi.c3
-rw-r--r--uhttpd-lua.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/uhttpd-cgi.c b/uhttpd-cgi.c
index 28686b4..1a6c6ad 100644
--- a/uhttpd-cgi.c
+++ b/uhttpd-cgi.c
@@ -562,7 +562,10 @@ void uh_cgi_request(struct client *cl, struct http_request *req, struct path_inf
close(wfd[1]);
if( !kill(child, 0) )
+ {
kill(child, SIGTERM);
+ waitpid(child, NULL, 0);
+ }
break;
}
diff --git a/uhttpd-lua.c b/uhttpd-lua.c
index b3f3cb4..c2efe33 100644
--- a/uhttpd-lua.c
+++ b/uhttpd-lua.c
@@ -533,7 +533,10 @@ void uh_lua_request(struct client *cl, struct http_request *req, lua_State *L)
close(wfd[1]);
if( !kill(child, 0) )
+ {
kill(child, SIGTERM);
+ waitpid(child, NULL, 0);
+ }
break;
}
@@ -543,5 +546,3 @@ void uh_lua_close(lua_State *L)
{
lua_close(L);
}
-
-