On Mon, Nov 06, 2017 at 12:11:13PM +0100, Pavlos Parissis wrote:
> On 06/11/2017 11:16 πμ, William Lallemand wrote:
> > The parent process supervises itself the children, we don't need to
> > store the children pids anymore in the pidfile in master-worker mode.
> 
> I have a small objection against this. Having PIDs in a file allows external 
> tools to monitor the
> workers. If those PIDs aren't written in a the pidfile then those tools have 
> to use pgrep to find
> them, unless the master process can provide them in some way(stats socket?).
> 
> My 2cents,
> Pavlos
> 

Hi Pavlos,

This patch was made to prevent scripts to send signals to the children directly
instead of sending them to the master which will forward them. That could end
in reporting a wrong exit code in the master for example.

One of the problem of the pidfile, is that only the latest children were
written, so you wouldn't have the remaining PID in this list on a reload.
With pgrep -P you will have the full list of processes attached to the master.

Unfortunately there is no stats socket on the master (yet?), so it's not
possible to do what you suggest.

However, we can maybe add an option to write all new PIDs in the pidfile if
it's easier for supervision.

-- 
William Lallemand

Reply via email to