From: William Lallemand Date: Mon, 6 Nov 2017 10:16:12 +0000 (+0100) Subject: MINOR: mworker: do not store child pid anymore in the pidfile X-Git-Tag: v1.8-rc3~53 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=92159b29014281337ebf44d6267cba24f0f72162;p=thirdparty%2Fhaproxy.git MINOR: mworker: do not store child pid anymore in the pidfile The parent process supervises itself the children, we don't need to store the children pids anymore in the pidfile in master-worker mode. --- diff --git a/src/haproxy.c b/src/haproxy.c index bcbbad4a11..4d4bd3b267 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)));