Excellent solution. Thks!
On 9月29日, 上午10时27分, Ben Darnell <
b...@bendarnell.com> wrote:
> Yes, this is why in general it's a good idea to use the FD_CLOEXEC
> flag. Tornado does this for all socket fds it opens. If you cannot
> easily set FD_CLOEXEC on all fds your application uses, you can use
> tornado.autoreload.add_reload_hook to close any remaining files
> (perhaps using os.closerange(3, MAX_FD). 3 is the first regular file
> descriptor; 0, 1, and 2 are stdin, stdout, and stderr)
>