uhttpd: finish inherited uloop in forked childs, fixes misdispatched events leading...
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 18 Jun 2012 00:41:43 +0000 (00:41 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 18 Jun 2012 00:41:43 +0000 (00:41 +0000)
SVN-Revision: 32419

package/uhttpd/Makefile
package/uhttpd/src/uhttpd-cgi.c
package/uhttpd/src/uhttpd-lua.c

index 9d8f9fa95d3f944eed3603a9ffa8855b945be49f..b8afa0d89f8066591c7959b6301914a952d0f44b 100644 (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 := \
index ee1b80cc7fe0c7a3fef38bade078d9c123447677..8336a1b71f6ecb266f0f7a3cb407613b92bef8e7 100644 (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]);
index 0b91b348f4087f730ae1dd7b14ee9f3483be1336..5158534e27103f86a96a70155e0ecb057ba867f1 100644 (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]);