ucm: use close_range on _GNU_SOURCE

Closes: https://github.com/alsa-project/alsa-lib/pull/459
Signed-off-by: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jochen Sprickerhof 2025-06-15 10:10:52 +02:00 committed by Jaroslav Kysela
parent 4ad4d9590a
commit 782b0597c2

View file

@ -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);