Notify master process

hi all

does anybody know if it is possible to execute code in the master
process of a running nginx by writing an nginx module. what i want to do
is to somehow notify the master process from a worker proces (e.g. by
changing some state in shared memory) and then execute code with the
master process’ user.

actually what i want to do is to force a config reload, so i have to
signal the master, but the worker does not have the permission to do so.

thanks in advance, bernd

Posted at Nginx Forum:

Rather than hacking the source or writing a module in my opinion its
to approach it from different side. For example to use inotify to
the config changes and to the ‘nginx -s reload’ on system level rather
inside the webserver itself.
Eg get inotify-tools ( ) (should
more or less in all distros) and use inotifywatch on the nginx.conf .


From: “dobe” [email protected]
Sent: Monday, January 11, 2010 11:58 AM
To: [email protected]
Subject: notify master process


thanks for your answer, i considered this already, but actually only
nginx knows of the event, then the new config hast to be fetched and
generated. i could touch a file with my module to trigger inotify and
use incron, but this does not work in our development environments which
are mostly macos x.

i want to do it with as little as possible outside dependencies and
deployment overhead, so the most convinient way would be to signal the

thx, bernd

Posted at Nginx Forum: