From: Daniel P. Berrangé Date: Wed, 21 Jun 2023 12:46:47 +0000 (+0100) Subject: rpc: automatically raise max file limit in all daemons X-Git-Tag: v9.6.0-rc1~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04b82f961b744b72ad716f810c46205ec81f4e57;p=thirdparty%2Flibvirt.git rpc: automatically raise max file limit in all daemons None of our daemons use select(), so it is safe to raise the max file limit to its maximum on startup. https://gitlab.com/libvirt/libvirt/-/issues/489 Reviewed-by: Peter Krempa Signed-off-by: Daniel P. Berrangé --- diff --git a/src/rpc/virnetdaemon.c b/src/rpc/virnetdaemon.c index 1292faa078..554b8852e4 100644 --- a/src/rpc/virnetdaemon.c +++ b/src/rpc/virnetdaemon.c @@ -33,6 +33,7 @@ #include "virnetserver.h" #include "virgdbus.h" #include "virhash.h" +#include "virprocess.h" #include "virsystemd.h" #define VIR_FROM_THIS VIR_FROM_RPC @@ -151,6 +152,8 @@ virNetDaemonNew(void) dmn->privileged = geteuid() == 0; dmn->autoShutdownInhibitFd = -1; + virProcessActivateMaxFiles(); + if (virEventRegisterDefaultImpl() < 0) goto error;