On Sat, Feb 09, 2013 at 10:47:23AM +0100, Marc-Antoine Perennou wrote:
> I'll do even simpler, when submitting V2 of this patchset with the EINTR
> issue,
> I'll basically forard every arg given to the wrapper to all the children
> themselves.
> The tool is not really meant to be used by the user himself though, but
> rather to
> be launched by the systemd service.

I understand but it's quite common to expect to reuse the same command
line everywhere.

> Is SIGUSR2 ok here ? I first did it with SIGUSR1 but then children couldn't
> bind
> to this signal on reload, since it was already a USR1 action, so I took the
> first one not colliding.

6 signals are used by haproxy :

  - SIGTTOU is used to make the old process temporarily release the ports
    it is bound to so that a new process may attempt a startup
  - SIGTTIN is used to tell the old process to rebind the ports that were
    unbound by SIGTTOU and continue its job as if nothing happened
  - SIGUSR1 is used to make the old process unbind and wait for the last
    connection to complete before exiting
  - SIGTERM is used to make the old process go away without waiting for
    connections to complete
  - SIGHUP is used to dump server states in the logs
  - SIGQUIT is used to dump memory pool usages to the logs

Additionally, I'd rather keep SIGUSR2 available for later use, because
the master-worker rework that Simon Horman did makes use of this signal
to restart the process and reopen config files.

However I think that your usage of SIGUSR2 is exactly the same as for
the master-worker mode so it seems to make a lot of sense to use it in
the wrapper.

Willy


Reply via email to