]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: unblock signals on startup.
authorWilly Tarreau <w@1wt.eu>
Wed, 20 Apr 2016 08:33:15 +0000 (10:33 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 20 Apr 2016 08:53:12 +0000 (10:53 +0200)
commitd50b4ac0d4acb00e0d2386198191ac329e8dbb77
tree293a4e01af2734fcb0f2f983d5a24408ebb605ed
parent07ecdea16562ddebe5ad1e8adaa2710ef7a82bb6
MEDIUM: unblock signals on startup.

A problem was reported recently by some users of programs compiled
with Go 1.5 which by default blocks all signals before executing
processes, resulting in haproxy not receiving SIGUSR1 or even SIGTERM,
causing lots of zombie processes.

This problem was apparently observed by users of consul and kubernetes
(at least).

This patch is a workaround for this issue. It consists in unblocking
all signals on startup. Since they're normally not blocked in a regular
shell, it ensures haproxy always starts under the same conditions.

Quite useful information reported by both Matti Savolainen and REN
Xiaolei actually helped find the root cause of this problem and this
workaround. Thanks to them for this.

This patch must be backported to 1.6 and 1.5 where the problem is
observed.
src/signal.c