apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: New post-log-transaction hook?
Date Wed, 19 Sep 2001 19:32:02 GMT
From: "Jon Travis" <jtravis@covalent.net>
Sent: Wednesday, September 19, 2001 2:27 PM


> On Wed, Sep 19, 2001 at 12:16:24PM -0700, Ryan Bloom wrote:
> > On Wednesday 19 September 2001 11:37 am, William A. Rowe, Jr. wrote:
> > >
> > > Considering how we use pools for dynamic libraries and the rest, it's
> > > absolutely vital that they are unspun from the pool in LIFO order of their
> > > creation.
> > 
> > I agree with Bill.  Having reviewed the code quite deeply yesterday, pool
> > cleanups follow a very clean rule, and registering a cleanup from within
> > a cleanup will always work if done correctly.  If you have data in a pool
> 
> BZzzzt.  The attached code registers a cleanup from within a cleanup, and
> does so 'correctly'.  See the program attached at the bottom, which behaves 
> incorrectly.  It is simple code, but not knowing that a given
> function registers a cleanup can cause major problems (leaking
> file descriptors, etc. eventually).  The file should contain 'Cleanup',
> because the cleanup of the file should flush the buffer -- that
> cleanup is never run, though.

Jon, there is no _doubt_ that it's broken right now.  I was speaking of the
'ideal', not today's borked behavior.

Extending the LIFO cleanups idea as a stack, we should be popping as we call
each cleanup, and allowing new cleanups to be pushed onto the end of the
cleanup stack..



Mime
View raw message