Re: Problem with $r->register_cleanup()

2001-06-14 Thread Doug MacEachern

On Wed, 7 Feb 2001 [EMAIL PROTECTED] wrote:

> Hi,
> 
> I just ran into a problem with $r->register_cleanup() only sometime beeing
> called.
> 
> This is mod_perl 1.24_01, perl 5.6.0, apache 1.3.14 compiled with gcc 5.6.0 on
> AIX 4.3.3.
> 
> Here's a sample code (snippet):
> 
> sub handler { # PerlTransHandler
>   my $r = shift;
>   $r->register_cleanup(\&clean1);
>   $r->push_handlers(PerlCleanupHandler => \&clean2);
>   $r->pnotes('cleanup', bless {} );
>   print STDERR 'in ";
 ^   ^

could this have something todo with it?
after fixing that, i tried your transhandler and get the expected results
in the error_log:
in register_cleanup register_cleanup push_handlers push_handlers DESTROY

if you still see this behavior with 1.25, i'd need more info of how to
reproduce the problem, such as what requests you're making that produce
unexpected results.





Antwort: Re: Problem with $r->register_cleanup()

2001-02-08 Thread Michael . Jacob

There are no other handlers besides my own (content and auth) and the core
apache...

Also, I'd think that every reload of a page (that get's served by the same
Apache child) should execute the same code and handlers with the same
result---but here's the register_cleanup sometimes gets called and sometimes
not. I press Reload, Reload, Reload... and get the result as below...

Michael


Datum: 07.02.2001 23:37
An:Michael Jacob/EXT/GAD@GAD
Kopie: [EMAIL PROTECTED]

Betreff:       Re: Problem with $r->register_cleanup()
Nachrichtentext:


Is it possible that another handler (such as CGI, or parsed-html) is
taking over before yours and exiting or returning OK.

Rob

>Hi,
>
>I just ran into a problem with $r->register_cleanup() only sometime beeing
>called.
>
>This is mod_perl 1.24_01, perl 5.6.0, apache 1.3.14 compiled with gcc 5.6.0 on
>AIX 4.3.3.
>
>Here's a sample code (snippet):
>
>sub handler { # PerlTransHandler
>  my $r = shift;
>  $r->register_cleanup(\&clean1);
>  $r->push_handlers(PerlCleanupHandler => \&clean2);
>  $r->pnotes('cleanup', bless {} );
>  print STDERR 'in ";
>  return DECLINE;
>}
>
>sub clean1 { print STDERR "register_cleanup "; }
>sub clean2 { print STDERR "push_handlers "; }
>sub DESTROY { print STDERR "DESTROY\n"; }
>
>And that's the error_log:
>
>in register_cleanup push_handlers DESTROY
>in register_cleanup push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in register_cleanup push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in register_cleanup push_handlers DESTROY
>in push_handlers DESTROY
>
>
>The pushed handler only get's called about a third or less of the time. :-(
>
>Any idea, bug?
>
>Michael Jacob
>
>PS: Yes I did some tests with -x...


Robert L. Landrum
Senior Programmer
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"It's working correctly.  It's simply working in contrast to what you have
perceived to be correct."







Re: Problem with $r->register_cleanup()

2001-02-07 Thread Robert Landrum

Is it possible that another handler (such as CGI, or parsed-html) is 
taking over before yours and exiting or returning OK.

Rob

>Hi,
>
>I just ran into a problem with $r->register_cleanup() only sometime beeing
>called.
>
>This is mod_perl 1.24_01, perl 5.6.0, apache 1.3.14 compiled with gcc 5.6.0 on
>AIX 4.3.3.
>
>Here's a sample code (snippet):
>
>sub handler { # PerlTransHandler
>  my $r = shift;
>  $r->register_cleanup(\&clean1);
>  $r->push_handlers(PerlCleanupHandler => \&clean2);
>  $r->pnotes('cleanup', bless {} );
>  print STDERR 'in ";
>  return DECLINE;
>}
>
>sub clean1 { print STDERR "register_cleanup "; }
>sub clean2 { print STDERR "push_handlers "; }
>sub DESTROY { print STDERR "DESTROY\n"; }
>
>And that's the error_log:
>
>in register_cleanup push_handlers DESTROY
>in register_cleanup push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in register_cleanup push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in register_cleanup push_handlers DESTROY
>in push_handlers DESTROY
>
>
>The pushed handler only get's called about a third or less of the time. :-(
>
>Any idea, bug?
>
>Michael Jacob
>
>PS: Yes I did some tests with -x...


Robert L. Landrum
Senior Programmer
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"It's working correctly.  It's simply working in contrast to what you have
perceived to be correct."



Problem with $r->register_cleanup()

2001-02-07 Thread Michael . Jacob

Hi,

I just ran into a problem with $r->register_cleanup() only sometime beeing
called.

This is mod_perl 1.24_01, perl 5.6.0, apache 1.3.14 compiled with gcc 5.6.0 on
AIX 4.3.3.

Here's a sample code (snippet):

sub handler { # PerlTransHandler
  my $r = shift;
  $r->register_cleanup(\&clean1);
  $r->push_handlers(PerlCleanupHandler => \&clean2);
  $r->pnotes('cleanup', bless {} );
  print STDERR 'in ";
  return DECLINE;
}

sub clean1 { print STDERR "register_cleanup "; }
sub clean2 { print STDERR "push_handlers "; }
sub DESTROY { print STDERR "DESTROY\n"; }

And that's the error_log:

in register_cleanup push_handlers DESTROY
in register_cleanup push_handlers DESTROY
in push_handlers DESTROY
in push_handlers DESTROY
in push_handlers DESTROY
in register_cleanup push_handlers DESTROY
in push_handlers DESTROY
in push_handlers DESTROY
in push_handlers DESTROY
in push_handlers DESTROY
in push_handlers DESTROY
in push_handlers DESTROY
in push_handlers DESTROY
in push_handlers DESTROY
in register_cleanup push_handlers DESTROY
in push_handlers DESTROY


The pushed handler only get's called about a third or less of the time. :-(

Any idea, bug?

Michael Jacob

PS: Yes I did some tests with -x...