httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <>
Subject [pre-PATCH] end-generation hook
Date Tue, 01 Mar 2011 16:32:01 GMT
(some background is in the thread starting with

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


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

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

View raw message