1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

Assume that O_CLOEXEC is always defined and works

This commit is contained in:
Florian Weimer
2017-04-18 14:56:51 +02:00
parent b48061e1a5
commit cef9b65376
27 changed files with 91 additions and 565 deletions

View File

@ -36,11 +36,7 @@ internal_setent (const char *file, struct nss_db_map *mapping)
{
enum nss_status status = NSS_STATUS_UNAVAIL;
int mode = O_RDONLY | O_LARGEFILE;
#ifdef O_CLOEXEC
mode |= O_CLOEXEC;
#endif
int fd = open_not_cancel_2 (file, mode);
int fd = open_not_cancel_2 (file, O_RDONLY | O_LARGEFILE | O_CLOEXEC);
if (fd != -1)
{
struct nss_db_header header;