apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <...@manyfish.co.uk>
Subject Re: apr_pool_clear fails if the cleanup handler is still running
Date Mon, 26 Jan 2004 11:20:41 GMT
On Sun, Jan 25, 2004 at 12:46:02PM -0800, Stas Bekman wrote:
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23238
...
> Shouldn't apr_pool_clear set to ignore SIGTERMs and restore the handler at 
> the end of its run? I suppose this will lose the signal if it's coming in 
> the middle of clear run. So may be a handler that will remember that the 
> signal was sent and then re-throw it once clear is done?
>
> But it's more than that. What if apr_pool_clear hasn't even started yet 
> when SIGTERM has arrived? In this case we deterministically lose all 
> cleanup functionality.

Yes - really, it's wrong to try and solve this in APR... the caller
should assume that no interfaces in APR are async-signal-safe since none
are documented to be so.  The only way of getting well-defined behaviour
outside APR would be to implement a "grafeful shutdown" in httpd as Colm
has proposed.

Regards,

joe

Mime
View raw message