perl-docs-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r109605 - /perl/modperl/docs/trunk/src/docs/2.0/user/porting/compat.pod
Date Fri, 03 Dec 2004 00:43:10 GMT
Author: stas
Date: Thu Dec  2 16:43:09 2004
New Revision: 109605

URL: http://svn.apache.org/viewcvs?view=rev&rev=109605
Log:
fix the incorrect $s->register_cleanup entry


Modified:
   perl/modperl/docs/trunk/src/docs/2.0/user/porting/compat.pod

Modified: perl/modperl/docs/trunk/src/docs/2.0/user/porting/compat.pod
Url: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/src/docs/2.0/user/porting/compat.pod?view=diff&rev=109605&p1=perl/modperl/docs/trunk/src/docs/2.0/user/porting/compat.pod&r1=109604&p2=perl/modperl/docs/trunk/src/docs/2.0/user/porting/compat.pod&r2=109605
==============================================================================
--- perl/modperl/docs/trunk/src/docs/2.0/user/porting/compat.pod	(original)
+++ perl/modperl/docs/trunk/src/docs/2.0/user/porting/compat.pod	Thu Dec  2 16:43:09 2004
@@ -788,19 +788,31 @@
 
 =head1 Server Object Methods
 
+
+
 =head2 C<$s-E<gt>register_cleanup>
 
 C<$s-E<gt>register_cleanup> has been replaced with
 C<APR::Pool::cleanup_register()> which accepts the pool object as the
 first argument instead of the server object. e.g.:
 
-  sub cleanup_callback { my $data = shift; ... }
-  $s->pool->cleanup_register(\&cleanup_callback, $data);
+  use Apache::ServerUtil ();
+  sub cleanup_callback {
+      my($pool, $s) = @_;
+      # your code comes here
+      Apache::OK;
+  }
+  $s->push_handlers(PerlChildExitHandler => \&my_access);
+
+where the arguments are the pool and server objects.
 
-where the last argument C<$data> is optional, and if supplied will be
-passed as the first argument to the callback function.
+See also
+C<L<PerlChildExitHandler|docs::2.0::user::handlers::server/C_PerlChildExitHandler_>>.
 
-See the C<L<APR::Pool|docs::2.0::api::APR::Pool>> manpage.
+In order to register a cleanup handler to be run only once when the
+main server (not each child process) shutsdown, you can register a
+cleanup handler on the
+C<L<base_server_pool()|docs::2.0::api::Apache::ServerUtil/C_base_server_pool_>>.
 
 
 =head2 C<$s-E<gt>uid>

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org


Mime
View raw message