perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Förtsch <>
Subject Re: Exceptions in APR::Pool cleanups
Date Mon, 19 Mar 2012 13:05:49 GMT
On Monday, 19 March 2012 08:32:41 Vick Khera wrote:
> > After a bit odf thinking about it I tend to forbid pool cleanups (and 
> > PerlCleanupHandlers) to die. If they do we can:
> > 2) stringify it and write it to STDERR
> >
> > 3) gather it in a special hash, e.g. @APR::Pool::cleanup_exceptions
> I concur with your thinking.  Option 3 would probably be most useful, though
> 2 has an appeal as well.

Thanks for the reply. I have just committed revision 1302389 which implements 
option 2.

I decided against 3 after I explained the problem to my wife which is often 
useful to clear my mind. The point is, what would the calling program do with 
@APR::Pool::cleanup_exceptions? Suppose you have a pool with 10 cleanups. Now 
you call $p->destroy. One of the cleanups dies. Which one? In general the 
calling program cannot do anything useful with the information other than log 
it somewhere. If a cleanup expects burps from its guts it should deal with 
them itself.

Anyway, the way it is done now allows to catch these exceptions as warnings by 
means of $SIG{__WARN__}.

Torsten Förtsch

Need professional modperl support? Hire me! (

Like fantasy?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message