From 6c2f7955e7300fb2cf0596fa5210cdeb3a2aea5f Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sat, 27 Feb 2016 08:20:17 +0100 Subject: [PATCH] BUG/MINOR: systemd: propagate the correct signal to haproxy Some people report that sometimes there's a collection of old processes after a restart of the systemd wrapper. It's not surprizing when reading the code, the SIGTERM is propagated as a SIGINT which asks for a graceful stop instead. If people ask for termination, we should terminate. --- src/haproxy-systemd-wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/haproxy-systemd-wrapper.c b/src/haproxy-systemd-wrapper.c index 42b0b0791..0c076a6a4 100644 --- a/src/haproxy-systemd-wrapper.c +++ b/src/haproxy-systemd-wrapper.c @@ -147,7 +147,7 @@ static void do_shutdown(int sig) if (pid > 0) { fprintf(stderr, SD_DEBUG "haproxy-systemd-wrapper: %s -> %d.\n", sig == SIGTERM ? "SIGTERM" : "SIGINT", pid); - kill(pid, SIGINT); + kill(pid, sig); free(pid_strv[i]); } }