]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: mworker: use the haproxy poll loop
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 11 Sep 2018 08:06:18 +0000 (10:06 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Sep 2018 08:21:58 +0000 (10:21 +0200)
commitb3f2be338bb544840e9e981ca89945b91fd6f120
tree9541a701b051f14fc3166bb27e5f1d742a3f4428
parent73e1dfcfdf913897fa52bc7945635972dd8fd0d6
MEDIUM: mworker: use the haproxy poll loop

In order to reorganize the code of the master worker, the mworker_wait()
function which was the main function was split. This function was
handling a wait() loop, but it does not need it anymore since the code
will use the poll loop of haproxy instead.

The function was split in several functions:

- mworker_catch_sigterm() which is a signal handler for SIGTERM ans
SIGUSR1 that sends the signals to the workers
- mworker_catch_sigchld() which is the code handling the leaving of a
child
- mworker_catch_sighup which basically call the mworker_restart()
function
- mworker_loop() which is the function calling the main poll loop in the
master
src/haproxy.c