From: Willy Tarreau Date: Tue, 25 Oct 2016 13:50:47 +0000 (+0200) Subject: BUG/MINOR: systemd: make the wrapper return a non-null status code on error X-Git-Tag: v1.7-dev5~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7643d09dca4d0eed97ba3c29d4f4fd1f037f96ae;p=thirdparty%2Fhaproxy.git BUG/MINOR: systemd: make the wrapper return a non-null status code on error When execv() fails to execute the haproxy executable, it's important to return an error instead of pretending everything is cool. This fix should be backported to 1.6 and 1.5 in order to improve the overall reliability under systemd. --- diff --git a/src/haproxy-systemd-wrapper.c b/src/haproxy-systemd-wrapper.c index d118ec6ffe..a78e75b369 100644 --- a/src/haproxy-systemd-wrapper.c +++ b/src/haproxy-systemd-wrapper.c @@ -94,7 +94,7 @@ static void spawn_haproxy(char **pid_strv, int nb_pid) fprintf(stderr, "\n"); execv(argv[0], argv); - exit(0); + exit(1); } }