Maxim Dounin
October 24, 2013 12:50PM
Hello!

On Thu, Oct 24, 2013 at 08:37:03AM -0400, mzabani wrote:

> It seems like the init_module callback is not executed in nginx's master
> process. At least, I've printed a call to getpid() and the pid returned was
> that of a process that wasn't running, which makes me think it is executed
> in a process that forks the master process itself.

Yes, the init_module callback is called after configuration parsing,
and on initial startup this happens before demonization, hence
there is no master process yet. On reconfiguration it's executed
in the master process itself.

--
Maxim Dounin
http://nginx.org/en/donation.html

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

Running code in nginx's master process

mzabani October 21, 2013 08:27PM

Re: Running code in nginx's master process

Maxim Dounin October 22, 2013 08:04AM

Re: Running code in nginx's master process

mzabani October 24, 2013 08:37AM

Re: Running code in nginx's master process

Maxim Dounin October 24, 2013 12:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 292
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