X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/2442fc33b90d1c5806b65738eada3d7af9230bc3..cf06be139539bebb2ebbfd955ba582186f88746a:/package/uhttpd/src/uhttpd-lua.c diff --git a/package/uhttpd/src/uhttpd-lua.c b/package/uhttpd/src/uhttpd-lua.c index fcbdc6482..c2efe3384 100644 --- a/package/uhttpd/src/uhttpd-lua.c +++ b/package/uhttpd/src/uhttpd-lua.c @@ -452,7 +452,7 @@ void uh_lua_request(struct client *cl, struct http_request *req, lua_State *L) FD_SET(wfd[1], &writer); /* wait until we can read or write or both */ - if( select(fd_max, &reader, + if( select_intr(fd_max, &reader, (content_length > -1) ? &writer : NULL, NULL, (data_sent < 1) ? &timeout : NULL) > 0 ) { @@ -533,7 +533,10 @@ void uh_lua_request(struct client *cl, struct http_request *req, lua_State *L) close(wfd[1]); if( !kill(child, 0) ) + { kill(child, SIGTERM); + waitpid(child, NULL, 0); + } break; } @@ -543,5 +546,3 @@ void uh_lua_close(lua_State *L) { lua_close(L); } - -