You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@gmail.com> on 2011/03/01 17:32:01 UTC
[pre-PATCH] end-generation hook
(some background is in the thread starting with
http://mail-archives.apache.org/mod_mbox/httpd-dev/201011.mbox/%3CAANLkTi=RAuUcu4i7fL-eWwMYDaKx4-Jh3er+sFwF_iGo@mail.gmail.com%3E)
end result of this patch:
a module can implement the end-generation hook to find out when the
last mpm child of a particular generation has exited
a pool seems to be the natural feature to help implement resources
with the lifetime of a generation, but as a generation lasts beyond
the DSO load/unload cycle during graceful restart, I fear an endless
stream of module bugs caused by generation pool cleanup functions
disappearing with the DSO unload
implementation:
each MPM runs a mpm-child-status hook when an MPM child is created or exits
core implements that hook and keeps counters of processes for each
active generation; when the count goes to zero, it runs the
end-generation hook with the generation number as a parameter
(that hook is also available to modules which might want a simple way
to track child process counts for other reasons)
cgid is also in the patch as a proof of concept of the end-generation
hook; the generation is part of the socket name, and a generation's
daemon process isn't terminated until the last child of that
generation exits; cgid needs a bit more work to cleanly handle this
though, and I haven't looked at other mods with graceful restart
issues
what's next?
- perhaps someone will confirm that the end-generation hook seems
usable, or otherwise comment on the patch
- extend the use of the mpm-child-status hook to cover all paths in
all bundled MPMs
- get motivation/time to really fix cgid