]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: systemd: make the wrapper return a non-null status code on error
authorWilly Tarreau <w@1wt.eu>
Tue, 25 Oct 2016 13:50:47 +0000 (15:50 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 25 Oct 2016 15:36:20 +0000 (17:36 +0200)
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.

src/haproxy-systemd-wrapper.c

index d118ec6ffed9ab854ac8e2dab27cf3c1bc4b7156..a78e75b369e621a1387b2dadcdfb4b3fef8ae025 100644 (file)
@@ -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);
        }
 }