diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2021-12-04 06:52:59 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2021-12-04 06:52:59 +0000 |
commit | bf01536e99885c0100ae82f545de1ee3c7682bcb (patch) | |
tree | 2cce40b55090b60e551d5c8561472634fb87e94b | |
parent | 636c9e1716657c823bd11e6a05d48adc6d076a63 (diff) |
Do not setup pipes between SERVER processes, they don't talk to each
other. Since this generates a full mesh, the amount of filedescriptors
needed grows quadratically with the amount of configured prefork
processes.
Might fix an out of filedescriptor bug that beck is seeing.
OK benno
-rw-r--r-- | usr.sbin/httpd/proc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/httpd/proc.c b/usr.sbin/httpd/proc.c index 2444d50b55c..3d701814496 100644 --- a/usr.sbin/httpd/proc.c +++ b/usr.sbin/httpd/proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.c,v 1.40 2021/04/20 21:11:56 dv Exp $ */ +/* $OpenBSD: proc.c,v 1.41 2021/12/04 06:52:58 florian Exp $ */ /* * Copyright (c) 2010 - 2016 Reyk Floeter <reyk@openbsd.org> @@ -419,6 +419,10 @@ proc_open(struct privsep *ps, int src, int dst) if (src == dst && i == j) continue; + /* Servers don't talk to each other. */ + if (src == PROC_SERVER && dst == PROC_SERVER) + continue; + pa = &ps->ps_pipes[src][i]; pb = &ps->ps_pipes[dst][j]; if (socketpair(AF_UNIX, |