httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Travis <jtra...@covalent.net>
Subject Re: New post-log-transaction hook?
Date Tue, 18 Sep 2001 20:17:51 GMT
On Tue, Sep 18, 2001 at 02:20:35PM -0500, William A. Rowe, Jr. wrote:
> From: "Ryan Bloom" <rbb@covalent.net>
> Sent: Tuesday, September 18, 2001 11:44 AM
> 
> 
> > On Tuesday 18 September 2001 08:17 am, William A. Rowe, Jr. wrote:
> > > Why not let the MPM register the lingerclose with APR_HOOK_MIDDLE in the
> > > post_connection hook?  That way, if Jon's (or any other author's) intent is
> > > to work before the lingering close, then it can be APR_HOOK_FIRST. 
> > > Otherwise register it APR_HOOK_LAST.
> > 
> > It shouldn't be a hook.  This should just be done with a pool cleanup.  Hooks
> > aren't the answer to every problem in the server.  Doing something after a
> > specific action, like the close of the connection should be done by registering
> > a pool cleanup.  Fix the bug that you can't register a cleanup within a cleanup,
> > and Jon's problem goes away completely, because he can use the cleanup
> > that he is already using.
> 
> The pool cleanup has one disadvantage (assuming the register cleanup within cleanup
> bug is fixed), the order of cleanups is a strict LIFO.
> 
> There _may_ be an advantage to an orderable hook.  At this point I agree, fix the
> register cleanup in cleanup bug, let Jon experiment with that solution, and then
> argue the merits for a new hook.

I've got a workaround for that right now (which seems to work fine).  I 
create a new pool within my cleanup, and destroy it before I exit.

-- Jon


Mime
View raw message