aboutsummaryrefslogtreecommitdiff
path: root/locale/loadlocale.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-11-15 14:00:58 -0500
committerUlrich Drepper <drepper@gmail.com>2011-11-15 14:00:58 -0500
commitd62a8200e1523a19c722eab97f54e34079fc3d0e (patch)
treedcd08ae4d2d939497e5dbd003bcccc103e260597 /locale/loadlocale.c
parent116415f80eeb88e1973a160b8a2ee707d24481b4 (diff)
downloadglibc-d62a8200e1523a19c722eab97f54e34079fc3d0e.zip
glibc-d62a8200e1523a19c722eab97f54e34079fc3d0e.tar.gz
glibc-d62a8200e1523a19c722eab97f54e34079fc3d0e.tar.bz2
Use O_CLOEXEC in a few more places
Diffstat (limited to 'locale/loadlocale.c')
-rw-r--r--locale/loadlocale.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/locale/loadlocale.c b/locale/loadlocale.c
index 61e6f7f..d33a494 100644
--- a/locale/loadlocale.c
+++ b/locale/loadlocale.c
@@ -1,5 +1,5 @@
/* Functions to read locale data files.
- Copyright (C) 1996-2004, 2005, 2006, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1996-2004, 2005, 2006, 2010, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -173,7 +173,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
file->decided = 1;
file->data = NULL;
- fd = open_not_cancel_2 (file->filename, O_RDONLY);
+ fd = open_not_cancel_2 (file->filename, O_RDONLY | O_CLOEXEC);
if (__builtin_expect (fd, 0) < 0)
/* Cannot open the file. */
return;
@@ -201,7 +201,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
_nl_category_names.str + _nl_category_name_idxs[category],
_nl_category_name_sizes[category] + 1);
- fd = open_not_cancel_2 (newp, O_RDONLY);
+ fd = open_not_cancel_2 (newp, O_RDONLY | O_CLOEXEC);
if (__builtin_expect (fd, 0) < 0)
return;