mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -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);
|
close(f);
|
||||||
|
|
||||||
|
#if defined(_GNU_SOURCE)
|
||||||
|
close_range(3, maxfd, 0);
|
||||||
|
#else
|
||||||
for (f = 3; f < maxfd; f++)
|
for (f = 3; f < maxfd; f++)
|
||||||
close(f);
|
close(f);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* install default handlers for the forked process */
|
/* install default handlers for the forked process */
|
||||||
signal(SIGINT, SIG_DFL);
|
signal(SIGINT, SIG_DFL);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue