core: Support closefrom also for glibc.
* src/posix-io.c (_gpgme_io_spawn): Use glibc's closefrom. -- Since 2.34, glibc introduces closefrom (the implementation follows *BSD standard). Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
a5662a801f
commit
4b64774b6d
@ -570,7 +570,7 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags,
|
|||||||
if (fd_list[i].fd > fd)
|
if (fd_list[i].fd > fd)
|
||||||
fd = fd_list[i].fd;
|
fd = fd_list[i].fd;
|
||||||
fd++;
|
fd++;
|
||||||
#if defined(__sun) || defined(__FreeBSD__)
|
#if defined(__sun) || defined(__FreeBSD__) || defined(__GLIBC__)
|
||||||
closefrom (fd);
|
closefrom (fd);
|
||||||
max_fds = fd;
|
max_fds = fd;
|
||||||
#else /*!__sun */
|
#else /*!__sun */
|
||||||
|
Loading…
Reference in New Issue
Block a user