On Fri, Apr 14, 2023 at 11:49 AM jean-frederic clere <jfcl...@gmail.com> wrote:
>
> Hi,
>
> I am try to gracefully stop a child process instead using ap_assert(0),
> is there a "clean way" to do that?

I added something like this to our distribution in IBM to address a
hairy problem with our security library.

Each MPM already has a way to terminate the process due to
MaxRequestsPerChild, e.g. check_infinite_requests() in worker and
event or the block like this in winnt:

        /* Have we hit MaxConnectionsPerChild connections? */
        if (ap_max_requests_per_child) {
            requests_this_child++;
            if (requests_this_child > ap_max_requests_per_child) {
                SetEvent(max_requests_per_child_event);
            }
        }


If you look at the "mpm_get_name" hook, this gives a pattern where
each MPM can provide the impl itself. Then there would just be some
non-static thing in e.g. core.c that does the ap_run_foo part.

Reply via email to