Hash :
0474f8e6
Author :
Date :
2017-08-12T11:34:50
dirent-safer: fix cloexec race * lib/opendir-safer.c: Include fcntl.h instead of unistd-safer.h. (opendir_safer): Use F_DUPFD_CLOEXEC. * modules/dirent-safer (Depends-on): Add fcntl. Remove unistd-safer. * tests/test-dirent-safer.c: Do not include unistd-safer.h, as it is no longer a prerequisite. Use F_DUPFD_CLOEXEC instead of dup_safer.
Description:
Directory functions that avoid clobbering STD{IN,OUT,ERR}_FILENO.
Files:
lib/dirent--.h
lib/dirent-safer.h
lib/opendir-safer.c
m4/dirent-safer.m4
Depends-on:
dirent
closedir
dirfd
fcntl
opendir
configure.ac:
gl_DIRENT_SAFER
gl_MODULE_INDICATOR([dirent-safer])
Makefile.am:
lib_SOURCES += opendir-safer.c
Include:
"dirent-safer.h"
License:
GPL
Maintainer:
Eric Blake