in reply to Re: close STDOUT does not work, why?
in thread close STDOUT does not work, why?

Actually the child will go on to run some long process. I put the sleep 30 there to simulate this long process. The parent print the HTML page and every time it refreshes, it will get new data from the new page that the child printed.