Mercurial > hg > nginx
comparison src/core/ngx_cycle.c @ 6383:85dea406e18f
Dynamic modules.
The auto/module script is extended to understand ngx_module_link=DYNAMIC.
When set, it links the module as a shared object rather than statically
into nginx binary. The module can later be loaded using the "load_module"
directive.
New auto/module parameter ngx_module_order allows to define module loading
order in complex cases. By default the order is set based on ngx_module_type.
3rd party modules can be compiled dynamically using the --add-dynamic-module
configure option, which will preset ngx_module_link to "DYNAMIC" before
calling the module config script.
Win32 support is rudimentary, and only works when using MinGW gcc (which
is able to handle exports/imports automatically).
In collaboration with Ruslan Ermilov.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 04 Feb 2016 20:25:29 +0300 |
parents | cf5e822cf470 |
children | fd4b52e74f96 |
comparison
equal
deleted
inserted
replaced
6382:392959224560 | 6383:85dea406e18f |
---|---|
210 } | 210 } |
211 | 211 |
212 ngx_strlow(cycle->hostname.data, (u_char *) hostname, cycle->hostname.len); | 212 ngx_strlow(cycle->hostname.data, (u_char *) hostname, cycle->hostname.len); |
213 | 213 |
214 | 214 |
215 cycle->modules = ngx_modules; | 215 if (ngx_cycle_modules(cycle) != NGX_OK) { |
216 ngx_destroy_pool(pool); | |
217 return NULL; | |
218 } | |
216 | 219 |
217 | 220 |
218 for (i = 0; cycle->modules[i]; i++) { | 221 for (i = 0; cycle->modules[i]; i++) { |
219 if (cycle->modules[i]->type != NGX_CORE_MODULE) { | 222 if (cycle->modules[i]->type != NGX_CORE_MODULE) { |
220 continue; | 223 continue; |