diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-06-18 00:41:43 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-06-18 00:41:43 +0000 |
commit | c73b39fd302245a47813d1a41a082df7b82c45fb (patch) | |
tree | ba2e5ccab10d9f4f116b09f56bb4f6b24fe3f3b1 /package/uhttpd/src/uhttpd-lua.c | |
parent | fd38f78bfe8a58cade2a902e53a6f38dc9224772 (diff) | |
download | upstream-c73b39fd302245a47813d1a41a082df7b82c45fb.tar.gz upstream-c73b39fd302245a47813d1a41a082df7b82c45fb.tar.bz2 upstream-c73b39fd302245a47813d1a41a082df7b82c45fb.zip |
uhttpd: finish inherited uloop in forked childs, fixes misdispatched events leading to race conditions and bad memory accesses
SVN-Revision: 32419
Diffstat (limited to 'package/uhttpd/src/uhttpd-lua.c')
-rw-r--r-- | package/uhttpd/src/uhttpd-lua.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/package/uhttpd/src/uhttpd-lua.c b/package/uhttpd/src/uhttpd-lua.c index 0b91b348f4..5158534e27 100644 --- a/package/uhttpd/src/uhttpd-lua.c +++ b/package/uhttpd/src/uhttpd-lua.c @@ -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]); |