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

Hi Merlyn,

Your example at Watching long processes through CGI (Aug 02) does not work if a person is running Apache ver 2.0 or later. I searched the web for the solution to this problem for awhile and found many references to your page and in other forums people also mentioned your example only prints out all the outputs when the Perl script finished but not while it is running. It would be helpful for others if somehow your example could be updated and include
close STDIN;
close STDERR;
and reopens these standard IOs to NULL to make it work for later version of apache.
Thanks for the reference though.

Replies are listed 'Best First'.
Re^3: close STDOUT does not work, why?
by f00li5h (Chaplain) on Aug 27, 2007 at 22:21 UTC

    Where are you suggesting those closes be put? perhaps as a diff/patch against the code listing or some line numbers would clarify your intent...

    It works as expected for me, when run as CGI in my userdir on Apache2, perhaps you're having issues with mod_perl or some other configuration issues?

    Running:

    @_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;