You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Stas Bekman <st...@stason.org> on 2001/01/08 16:46:10 UTC

flushing appears to be broken with perl 5.6.0

Hi,

This simple Apache::Registry script is supposed to print the PID and then
hang, it used to work with older mod_perl/perl versions, it doesn't print
the PID now -- rflush doesn't seem to work. (neither $|=1 works)

  my $r = shift;
  $r->send_http_header('text/plain');

  $r->print("PID = $$\n");
  $r->rflush;

  while(1){
    sleep 1;
  }

I've tested it with mod_perl-1.24_(01|02)/apache-1.3.14 and
mod_perl-1.24/apache-1.3.12 with perl 5.6.0 (running on Linux).

Has it something to do with bugs in 5.6.0? If you have the patched version
of 5.6.0 can you please test it?

Thanks.

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:stas@stason.org   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/



Re: flushing appears to be broken with perl 5.6.0

Posted by Stas Bekman <st...@stason.org>.
On Mon, 8 Jan 2001, Stas Bekman wrote:

> Hi,
>
> This simple Apache::Registry script is supposed to print the PID and then
> hang, it used to work with older mod_perl/perl versions, it doesn't print
> the PID now -- rflush doesn't seem to work. (neither $|=1 works)
>
>   my $r = shift;
>   $r->send_http_header('text/plain');
>
>   $r->print("PID = $$\n");
>   $r->rflush;
>
>   while(1){
>     sleep 1;
>   }
>
> I've tested it with mod_perl-1.24_(01|02)/apache-1.3.14 and
> mod_perl-1.24/apache-1.3.12 with perl 5.6.0 (running on Linux).
>
> Has it something to do with bugs in 5.6.0? If you have the patched version
> of 5.6.0 can you please test it?

As pointed out by Niraj Sheth in the private reply I had a problem with
front-end buffering. Accessing the back-end server directly solves the
problem.

Which leads to a question, on how to make the real flush.  Currently
rflush and ($|=1) are quite useless if there is a buffering process at the
front end side.

Thanks.

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:stas@stason.org   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/