From b95360d5bc9e5463157d91656aaac22180c24f1a Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 29 Mar 2010 09:26:02 +0000 Subject: uhttpd: fix a signal related race condition exposed by LuCI on fast machines SVN-Revision: 20573 --- package/uhttpd/src/uhttpd-lua.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'package/uhttpd/src/uhttpd-lua.c') diff --git a/package/uhttpd/src/uhttpd-lua.c b/package/uhttpd/src/uhttpd-lua.c index b3f3cb4..c2efe33 100644 --- a/package/uhttpd/src/uhttpd-lua.c +++ b/package/uhttpd/src/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); } - - -- cgit v1.1