Re: init module callback called twice

2021-04-08 Thread Maxim Dounin
Hello! On Thu, Apr 08, 2021 at 09:48:41AM -0400, xdrew wrote: > Thanks Maxim, this makes perfect sense! However the part of the question > still stands: is there a way from ngx_cycle_t structure or from some global > structure to figure out in which mode nginx is running - testing the > configura

Re: init module callback called twice

2021-04-08 Thread xdrew
Thanks Maxim, this makes perfect sense! However the part of the question still stands: is there a way from ngx_cycle_t structure or from some global structure to figure out in which mode nginx is running - testing the configuration or actually starting? Posted at Nginx Forum: https://forum.nginx.

Re: init module callback called twice

2021-04-08 Thread Maxim Dounin
Hello! On Thu, Apr 08, 2021 at 05:54:42AM -0400, xdrew wrote: > Hello, > > I'm developing a little custom module for nginx, and I need to execute some > user code once my module is loaded. I do this by attaching to the hook in > ngx_module_t structure: > > ngx_module_t ngx_http_hello_world_mod

init module callback called twice

2021-04-08 Thread xdrew
Hello, I'm developing a little custom module for nginx, and I need to execute some user code once my module is loaded. I do this by attaching to the hook in ngx_module_t structure: ngx_module_t ngx_http_hello_world_module = { ... NULL, /* init master */ i