> Am 28.06.2021 um 11:18 schrieb Yann Ylavic <[email protected]>:
> 
> On Mon, Jun 28, 2021 at 10:28 AM Stefan Eissing
> <[email protected]> wrote:
>> 
>> what do you think about adding a hook for MPMQ state changes?
>> 
>> AP_MPMQ_STARTING -> AP_MPMQ_RUNNING -> AP_MPMQ_STOPPING
> 
> Fine by me, we just need to make sure that the hooks are not called
> from signal handlers (e.g. MPM prefork sets AP_MPMQ_STOPPING in the
> stop_listening() handler).

Right. Let's say we restrict this to changes in child processes. As in:

1. AP_DECLARE_HOOK(void,child_running,(apr_pool_t *pchild, server_rec *s)) 
2. AP_DECLARE_HOOK(void,child_stopping,(apr_pool_t *pchild, server_rec *s, int 
graceful)) 

1 could be called in the mpm's "child_main()" function.
2.could be called
  event.c#1326: in close_listeners()
  worker.c#714: listener_thread() exits its loop
  winnt/child.c#1145: at start of shutdown
  prefork.c: does not set _STOPPING in child processes it seems. 2 might be 
called in line 681
  netware: is this still maintained?
  os2: does not care about MPMQ_* things (is this still maintained?)
  motorz: line 948
  simple: does not really care about MPMQ_ 

- Stefan

Reply via email to