]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: systemd: propagate the correct signal to haproxy
authorWilly Tarreau <w@1wt.eu>
Sat, 27 Feb 2016 07:20:17 +0000 (08:20 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 27 Feb 2016 07:28:43 +0000 (08:28 +0100)
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

index 42b0b0791b9787fd90b1179bbc2f59446a4f39af..0c076a6a41e21104e8ab19ed2b39f32a1bb897bf 100644 (file)
@@ -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]);
                }
        }