From nobody Thu Apr 4 06:51:57 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V9C315vBqz5GPdP; Thu, 4 Apr 2024 06:51:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V9C315Lbdz4XsW; Thu, 4 Apr 2024 06:51:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712213517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mFwPQT0EC0yvwxg9rtPYVgH2x+JYAemlFBX0rI95k0c=; b=NzTc/A4f508PFCWlOTN9da5cx4/Je495tUBxN7A+nOG2Fbkz7hxNvmocyJBECHhg+eVPLs uZa6hpJXEX7o2OpSkBLE/vDFzOKBqGuSxhA/8TCIeWW9C1xHMmERd4lf75tGyibJPeOZa1 mgAJzlQxOW3a14Y7Esh/b6NDbBBGYKMz6MFV9e6lm2OVZmrCQoS/sanGRwFVHkGMQCzEbp 92Ik5eefoVG/spa3H+7pw8hfHkgP/PAn8vN/tlX33UL1Wnrssj66FkrEOLSOHX/vPdqONR HQvz38gMe2qo26TGnaNrBRo+ZPbJNoX8iT7ljn728X2qmJh8tt/j7WpWw26hyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712213517; a=rsa-sha256; cv=none; b=Uo0syfJyi6jfEOCoLbRwFmQO6cuba8DL+wHUTyRw09xCmB+2alhOdxyaC8i8uz0PCYxtaL dANO60IibPCngGuaDFaOQiC2nq1nIVn2rnHxf+rq5eZhARi8TbyDiBY9tJz2qTOelqykeC Qux6w47/8mAFMAE02LFeRrONeY48L0ZASzZ+BVK/IJldIlgY9F7tZpB1r4NeP4+mm2VmgS mB28Gs+c60YSLJb0UNIacIxcWMXfWy6JQl7tfrqJhgffzhwSMjUC7xqMKvTetDsHsusYhW bXWaPMIN5GWjg15xI6aKaNJ9m1wvncGg5QOfOh5dqh7n/x375IkYGTY16C9khA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712213517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mFwPQT0EC0yvwxg9rtPYVgH2x+JYAemlFBX0rI95k0c=; b=JjblPr47wDhDDQgBR4iKFWKmnr6lGhBG89vNUmTd5Lnkwi52+I67kT6CUf3JTC6dQbUmTc 2f7k4vdMNid7xawyn3uo2Zs5gtOsjf5Y4qv4Z7szRz4VSrwB73gqzjSLWFRtzjMhpZyPVl f7sQPmdVZXd1xIZHuZELqKaGq32aIikSFVxJN27IoE6zDL5OyZF47tzhLsQ9gWAL++r7Qc 1ZpLUxxzfIS6AkMsvggFbmCDaVtJNFD7yNbYYFp11QCovRRk+BPCLwIBzR9ISVyoBK0IAH LBmV3OeoQLd/XGP/+74kHwIkn5QFUcCVJUJT8BbRfyebCUU1mOgTYCFgqYusvQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V9C314xwBz15Yf; Thu, 4 Apr 2024 06:51:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4346pvWh083544; Thu, 4 Apr 2024 06:51:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4346pvLO083541; Thu, 4 Apr 2024 06:51:57 GMT (envelope-from git) Date: Thu, 4 Apr 2024 06:51:57 GMT Message-Id: <202404040651.4346pvLO083541@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Baptiste Daroussin Subject: git: b6601a931c59 - main - audio/pulseaudio: speed up startup List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b6601a931c59fe8ce1d83c00c3eae61f9560f1b4 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/ports/commit/?id=b6601a931c59fe8ce1d83c00c3eae61f9560f1b4 commit b6601a931c59fe8ce1d83c00c3eae61f9560f1b4 Author: Baptiste Daroussin AuthorDate: 2024-04-04 06:50:30 +0000 Commit: Baptiste Daroussin CommitDate: 2024-04-04 06:51:37 +0000 audio/pulseaudio: speed up startup Instead of looping over all possible filedescriptors to close them, Use closefrom() where possible --- audio/pulseaudio/Makefile | 2 +- .../files/patch-src_pulsecore_core-util.c | 24 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/audio/pulseaudio/Makefile b/audio/pulseaudio/Makefile index caf1e3cd2458..fc5b453dab17 100644 --- a/audio/pulseaudio/Makefile +++ b/audio/pulseaudio/Makefile @@ -4,7 +4,7 @@ PORTNAME= pulseaudio DISTVERSION= 16.1 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= audio MASTER_SITES= https://freedesktop.org/software/pulseaudio/releases/ diff --git a/audio/pulseaudio/files/patch-src_pulsecore_core-util.c b/audio/pulseaudio/files/patch-src_pulsecore_core-util.c new file mode 100644 index 000000000000..f3eb4e9d25fc --- /dev/null +++ b/audio/pulseaudio/files/patch-src_pulsecore_core-util.c @@ -0,0 +1,24 @@ +--- src/pulsecore/core-util.c.orig 2024-04-04 06:44:07 UTC ++++ src/pulsecore/core-util.c +@@ -2849,12 +2849,19 @@ int pa_close_allv(const int except_fds[]) { + } + + #endif +- ++#if defined(__FreeBSD__) ++ maxfd = 0; ++ for (i = 0; except_fds[i] >= 0; i++) ++ if (except_fds[i] > maxfd) ++ maxfd = except_fds[i]; ++ maxfd++; ++ closefrom(maxfd); ++#else + if (getrlimit(RLIMIT_NOFILE, &rl) >= 0) + maxfd = (int) rl.rlim_max; + else + maxfd = sysconf(_SC_OPEN_MAX); +- ++#endif + for (fd = 3; fd < maxfd; fd++) { + int i; + bool found;