Greg Hudson wrote:
> On Fri, 2006-01-27 at 09:24 -0800, Justin Erenkrantz wrote:
>
>>The key for the subpool is to have serf's socket be in a separate pool
>>from the main session pool. Without that (i.e. everything in one
>>pool), the underlying socket gets cleared before the serf cleanup
>>routines are called and it leads to a segfault. Placing serf in its
>>own subpool resolves this problem.
>
>
> Two criticisms:
>
> * APR documents that cleanups are run in reverse order of
> registration, but I don't see any documentation that subpool cleanups
> will be run after pool cleanups.
And they're not. pool cleanups will be run after subpool cleanups.
The first thing that happens on apr_pool_clear() is destruction of
its subpools, only after that the pools cleanups are run.
Aparently this isn't obvious, so I guess I'll need to go and document
that.
> So, unless I missed something, you seem to have resolved this problem
> by relying on undocumented behavior,
> when you could just register your cleanup after the socket is created
> and rely on documented behavior.
Sander
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jan 27 22:06:35 2006