The parent process supervises itself the children, we don't need to
store the children pids anymore in the pidfile in master-worker mode.
---
 src/haproxy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/haproxy.c b/src/haproxy.c
index bcbbad4a1..4d4bd3b26 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -2649,7 +2649,7 @@ int main(int argc, char **argv)
                        else if (ret == 0) /* child breaks here */
                                break;
                        children[proc] = ret;
-                       if (pidfd >= 0) {
+                       if (pidfd >= 0 && !(global.mode & MODE_MWORKER)) {
                                char pidstr[100];
                                snprintf(pidstr, sizeof(pidstr), "%d\n", ret);
                                shut_your_big_mouth_gcc(write(pidfd, pidstr, 
strlen(pidstr)));
-- 
2.13.6


Reply via email to