]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: systemd: always restore signals before execve()
authorWilly Tarreau <w@1wt.eu>
Tue, 25 Oct 2016 14:49:31 +0000 (16:49 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 25 Oct 2016 15:36:20 +0000 (17:36 +0200)
commit4351ea61fbddf88c960179d60b0e0f1b090f0b70
tree52c7353fe68462a27b9ac114df8e44bd71f17673
parent7643d09dca4d0eed97ba3c29d4f4fd1f037f96ae
BUG/MINOR: systemd: always restore signals before execve()

Since signals are inherited, we must restore them before calling execve()
and intercept them again after a failed execve(). In order to cleanly deal
with the SIGUSR2/SIGHUP loops where we re-exec the wrapper, we ignore these
two signals during a re-exec, and restore them to defaults when spawning
haproxy.

This should be backported to 1.6 and 1.5.
src/haproxy-systemd-wrapper.c