]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: mworker: block SIGCHLD until the master is ready
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 11 Sep 2018 08:06:21 +0000 (10:06 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Sep 2018 08:21:58 +0000 (10:21 +0200)
commitebf304f8dd02497ceaf6f50b50afc59c26a77ee1
tree7ddf8874a42f5a256d1ddc1eaf89a384fe26ac4b
parent91c13b696a4d80c707d1bad2c908cfd65d897bf9
MEDIUM: mworker: block SIGCHLD until the master is ready

With the new way of handling the signals in the master worker, we are
are not staying in a waitpid() loop. Which means that we need to catch the
SIGCHLD signals to call waitpid().

The problem is when the master is reloading, this signal is neither
registered nor blocked so we lost all signals between the restart and
the call to mworker_loop().

This patch blocks the SIGCHLD signals before the reloading and ensure
it's not unblocked before the master registered the SIGCHLD handler.
src/haproxy.c
src/signal.c