in reply to Re: Background process with perl and lighttpd
in thread Background process with perl and lighttpd

Or just

use IO::Handle; flush STDOUT;

Replies are listed 'Best First'.
Re^3: Background process with perl and lighttpd
by MonsieurBon (Initiate) on Jun 03, 2010 at 12:16 UTC

    flushing the output does not work...

    The only thing that works is closing STDIN, STDOUT and STDERR. But then the script stops!

    This is what I have:

    my $q = new CGI; my $session = CGI::Session->load($q); my $tmpfile = $q->upload('upfile'); my $filename = $q->param('upfile'); print $q->redirect('showProgress.cgi'); close STDOUT; close STDIN; close STDERR; # <-- script stops here! append_file( 'debug', "start\n" );

        Thx alot, this helped!

        What is this for?

        unless (open F, "-|") { open STDERR, ">&=1"; }