Tags: openresty/lua-nginx-module
Tags
bugfix: ngx.pipe waits until timeout because child process forgot to … …close pipe after dup2. After the fork, the pipe will be copied by dup2, so there are two fd for the same open file description. eg: 0, 11 for the same pipe file, 1, 13 for another pipe file. When running a short life process, the fd will be closed automatically when the process exits. When running a daemon process, the daemon may close fd 0, fd 1 and redirect them to /dev/null, but left the fd 11 and fd 13 opened forever. when ngx.pipe reads from the pipe, it will wait for reading until the pipe is closed or timeout. Because the daemon won't close the pipe, so ngx.pipe will wait for the timeout.
bugfix: ngx.pipe waits until timeout because child process forgot to … …close pipe after dup2. After the fork, the pipe will be copied by dup2, so there are two fd for the same open file description. eg: 0, 11 for the same pipe file, 1, 13 for another pipe file. When running a short life process, the fd will be closed automatically when the process exits. When running a daemon process, the daemon may close fd 0, fd 1 and redirect them to /dev/null, but left the fd 11 and fd 13 opened forever. when ngx.pipe reads from the pipe, it will wait for reading until the pipe is closed or timeout. Because the daemon won't close the pipe, so ngx.pipe will wait for the timeout.
tests: NGINX_TEST_CHECK_LEAK detects memoryleak because nginx can not… … free resolver ctx quickly. This was introduce in commit acd5364 which is use to resovle double free of resolver ctx. This issue happens only when nginx can not get any reply from the dns server until timeout.
feature: implemented the new tcpsok:setoption() function for setting … …options for the TCP socket.