Welcome! Log In Create A New Profile

Advanced

Re: env lost effect in single process mode

December 13, 2010 05:58AM
On Mon, Dec 13, 2010 at 02:42:06AM -0500, speedfirst wrote:

> Hey, I find when I set daemon off and master_process off to enter the
> dev single process mode, env simply doesn't work. My custom module
> depending on that env can't find them. So I check the code and find in
> ngx_single_process_cycle, ngx_set_environment is not invoked. So I add
> it like fellow code. Maybe u can fix this little bug in your main nginx
> branch.
>
> [code]
> void
> ngx_single_process_cycle(ngx_cycle_t *cycle)
> {
> ngx_uint_t i;
>
> if (ngx_set_environment(cycle, NULL) == NULL) { <--- add this code
> /* fatal */
> exit(2);
> }
>
> for (i = 0; ngx_modules[i]; i++) {
> if (ngx_modules[i]->init_process) {
> if (ngx_modules[i]->init_process(cycle) == NGX_ERROR) {
> /* fatal */
> exit(2);
> }
> }
> }
> [/code]

OK, I will add it in 0.9.3, however, please note that single process mode
was never intended to run in production: there are issues related to
reconfiguration (HUP signal).


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

env lost effect in single process mode

speedfirst December 13, 2010 02:42AM

Re: env lost effect in single process mode

Igor Sysoev December 13, 2010 05:58AM

Re: env lost effect in single process mode

speedfirst December 13, 2010 09:20PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 259
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready