]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mworker: do not store child pid anymore in the pidfile
authorWilliam Lallemand <wlallemand@haproxy.com>
Mon, 6 Nov 2017 10:16:12 +0000 (11:16 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 6 Nov 2017 10:19:53 +0000 (11:19 +0100)
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

index bcbbad4a115e7b5ae21a7991f8c0cb7ee2a15159..4d4bd3b267f8e97a042cd1c264e605fb396b096f 100644 (file)
@@ -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)));