]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: threads: don't close the thread waker pipe if not init
authorWilliam Lallemand <wlallemand@haproxy.com>
Sat, 15 Dec 2018 21:34:31 +0000 (22:34 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 15 Dec 2018 22:33:32 +0000 (23:33 +0100)
commit808e1b7c40550510bb6c1be72e5bc99c019c336b
treeb406700b8093b8eaeb667b05739d67bc4846cab6
parenta648399c901485a4985f786075535756946113cc
BUG/MEDIUM: threads: don't close the thread waker pipe if not init

This bugfix concerns the thread deinit but affects the master process.

When the master process falls in wait mode (it fails to reload the
configuration), it launches the deinit_pollers_per_thread and close the
thread waker pipe. It closes rd (-1) and wr (0).

Closing a FD in the master can have several sides effects and the
process will probably quit at some point.

In this case it assigns 0 to the socketpair of a worker during the next
correct reload, and then closes the socketpair once it falls in wait
mode again. The worker assumes that the master died and leaves.
src/fd.c