mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-28 05:40:23 -04:00
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:
parent
4ad4d9590a
commit
782b0597c2
1 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue