From: Jochen Sprickerhof <git@jochen.sprickerhof.de>
To: alsa-devel@alsa-project.org
Cc: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Subject: [PATCH] ucm: use close_range on _GNU_SOURCE
Date: Wed, 30 Jul 2025 14:19:01 +0200 [thread overview]
Message-ID: <20250730121901.117101-1-git@jochen.sprickerhof.de> (raw)
---
src/ucm/ucm_exec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/ucm/ucm_exec.c b/src/ucm/ucm_exec.c
index 276cf592..b79a84ae 100644
--- a/src/ucm/ucm_exec.c
+++ b/src/ucm/ucm_exec.c
@@ -254,8 +254,12 @@ int uc_mgr_exec(const char *prog)
close(f);
+#if defined(_GNU_SOURCE)
+ close_range(3, maxfd, 0);
+#else
for (f = 3; f < maxfd; f++)
close(f);
+#endif
/* install default handlers for the forked process */
signal(SIGINT, SIG_DFL);
--
2.50.0
reply other threads:[~2025-08-04 7:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250730121901.117101-1-git@jochen.sprickerhof.de \
--to=git@jochen.sprickerhof.de \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).