From: florian Date: Sat, 4 Dec 2021 06:52:58 +0000 (+0000) Subject: Do not setup pipes between SERVER processes, they don't talk to each X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f2de6a3f63182db55d005c32d33e1b5cb686ff32;p=openbsd 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 --- 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 @@ -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,