1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-07-01 00:53:50 +03:00

[package] uhttpd: finish inherited uloop in forked childs, fixes misdispatched events leading to race conditions and bad memory accesses

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32419 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2012-06-18 00:41:43 +00:00
parent 767678c987
commit 31767f1683
3 changed files with 7 additions and 1 deletions

View File

@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=uhttpd
PKG_RELEASE:=35
PKG_RELEASE:=36
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_CONFIG_DEPENDS := \

View File

@ -365,6 +365,9 @@ bool uh_cgi_request(struct client *cl, struct path_info *pi,
sleep(atoi(getenv("UHTTPD_SLEEP_ON_FORK") ?: "0"));
#endif
/* do not leak parent epoll descriptor */
uloop_done();
/* close loose pipe ends */
close(rfd[0]);
close(wfd[1]);

View File

@ -397,6 +397,9 @@ bool uh_lua_request(struct client *cl, lua_State *L)
sleep(atoi(getenv("UHTTPD_SLEEP_ON_FORK") ?: "0"));
#endif
/* do not leak parent epoll descriptor */
uloop_done();
/* close loose pipe ends */
close(rfd[0]);
close(wfd[1]);