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.
This commit is contained in:
Willy Tarreau 2016-10-25 15:50:47 +02:00
parent 07c3d78c2c
commit 7643d09dca

View File

@ -94,7 +94,7 @@ static void spawn_haproxy(char **pid_strv, int nb_pid)
fprintf(stderr, "\n"); fprintf(stderr, "\n");
execv(argv[0], argv); execv(argv[0], argv);
exit(0); exit(1);
} }
} }