diff options
author | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-03-29 09:26:02 +0000 |
---|---|---|
committer | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-03-29 09:26:02 +0000 |
commit | 775c9042b42e2cfcc54dafb0a56e702ef3e01a9c (patch) | |
tree | 5e6b2bb6d0b840d9117876b996740db279572bfb /uhttpd-lua.c | |
parent | e386e7e88e00ff29285b4a64f51ebb635846807d (diff) | |
download | uhttpd-775c9042b42e2cfcc54dafb0a56e702ef3e01a9c.tar.gz |
[package] uhttpd: fix a signal related race condition exposed by LuCI on fast machines
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/package/uhttpd/src@20573 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'uhttpd-lua.c')
-rw-r--r-- | uhttpd-lua.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); } - - |