You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
981 B

  1. From 03c706d71e2d314670d2ebb4dfa48fd3b793b361 Mon Sep 17 00:00:00 2001
  2. From: Willy Tarreau <w@1wt.eu>
  3. Date: Tue, 25 Oct 2016 15:50:47 +0200
  4. Subject: [PATCH 12/26] BUG/MINOR: systemd: make the wrapper return a non-null
  5. status code on error
  6. When execv() fails to execute the haproxy executable, it's important to
  7. return an error instead of pretending everything is cool. This fix should
  8. be backported to 1.6 and 1.5 in order to improve the overall reliability
  9. under systemd.
  10. (cherry picked from commit 7643d09dca4d0eed97ba3c29d4f4fd1f037f96ae)
  11. ---
  12. src/haproxy-systemd-wrapper.c | 2 +-
  13. 1 file changed, 1 insertion(+), 1 deletion(-)
  14. diff --git a/src/haproxy-systemd-wrapper.c b/src/haproxy-systemd-wrapper.c
  15. index d118ec6..a78e75b 100644
  16. --- a/src/haproxy-systemd-wrapper.c
  17. +++ b/src/haproxy-systemd-wrapper.c
  18. @@ -94,7 +94,7 @@ static void spawn_haproxy(char **pid_strv, int nb_pid)
  19. fprintf(stderr, "\n");
  20. execv(argv[0], argv);
  21. - exit(0);
  22. + exit(1);
  23. }
  24. }
  25. --
  26. 2.7.3