uhttpd: finish inherited uloop in forked childs, fixes misdispatched events leading to race conditions and bad memory accesses
SVN-Revision: 32419
This commit is contained in:
parent
fd38f78bfe
commit
c73b39fd30
3 changed files with 7 additions and 1 deletions
|
@ -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 := \
|
||||
|
|
|
@ -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]);
|
||||
|
|
|
@ -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]);
|
||||
|
|
Loading…
Reference in a new issue