|
From 03c706d71e2d314670d2ebb4dfa48fd3b793b361 Mon Sep 17 00:00:00 2001
|
|
From: Willy Tarreau <w@1wt.eu>
|
|
Date: Tue, 25 Oct 2016 15:50:47 +0200
|
|
Subject: [PATCH 12/26] 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.
|
|
(cherry picked from commit 7643d09dca4d0eed97ba3c29d4f4fd1f037f96ae)
|
|
---
|
|
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 d118ec6..a78e75b 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);
|
|
}
|
|
}
|
|
|
|
--
|
|
2.7.3
|
|
|