mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
[package] uhttpd: fix a signal related race condition exposed by LuCI on fast machines
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20573 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=uhttpd
|
PKG_NAME:=uhttpd
|
||||||
PKG_RELEASE:=5
|
PKG_RELEASE:=6
|
||||||
|
|
||||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||||
|
|
||||||
|
|||||||
@@ -562,7 +562,10 @@ void uh_cgi_request(struct client *cl, struct http_request *req, struct path_inf
|
|||||||
close(wfd[1]);
|
close(wfd[1]);
|
||||||
|
|
||||||
if( !kill(child, 0) )
|
if( !kill(child, 0) )
|
||||||
|
{
|
||||||
kill(child, SIGTERM);
|
kill(child, SIGTERM);
|
||||||
|
waitpid(child, NULL, 0);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -533,7 +533,10 @@ void uh_lua_request(struct client *cl, struct http_request *req, lua_State *L)
|
|||||||
close(wfd[1]);
|
close(wfd[1]);
|
||||||
|
|
||||||
if( !kill(child, 0) )
|
if( !kill(child, 0) )
|
||||||
|
{
|
||||||
kill(child, SIGTERM);
|
kill(child, SIGTERM);
|
||||||
|
waitpid(child, NULL, 0);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -543,5 +546,3 @@ void uh_lua_close(lua_State *L)
|
|||||||
{
|
{
|
||||||
lua_close(L);
|
lua_close(L);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user