fix bug: some cgi env close STDIN/STDOUT, and socket()=0, and for singleton, it will fail next HTTP request