diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-11-15 14:00:58 -0500 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-11-15 14:00:58 -0500 |
commit | d62a8200e1523a19c722eab97f54e34079fc3d0e (patch) | |
tree | dcd08ae4d2d939497e5dbd003bcccc103e260597 /locale/loadarchive.c | |
parent | 116415f80eeb88e1973a160b8a2ee707d24481b4 (diff) | |
download | glibc-d62a8200e1523a19c722eab97f54e34079fc3d0e.tar.gz glibc-d62a8200e1523a19c722eab97f54e34079fc3d0e.tar.xz glibc-d62a8200e1523a19c722eab97f54e34079fc3d0e.zip |
Use O_CLOEXEC in a few more places
Diffstat (limited to 'locale/loadarchive.c')
-rw-r--r-- | locale/loadarchive.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/locale/loadarchive.c b/locale/loadarchive.c index 663202e54e..47a6127a52 100644 --- a/locale/loadarchive.c +++ b/locale/loadarchive.c @@ -1,5 +1,5 @@ /* Code to load locale data from the locale archive file. - Copyright (C) 2002, 2003, 2005, 2010 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2005, 2010, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -203,7 +203,7 @@ _nl_load_locale_from_archive (int category, const char **namep) archmapped = &headmap; /* The archive has never been opened. */ - fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE); + fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE|O_CLOEXEC); if (fd < 0) /* Cannot open the archive, for whatever reason. */ return NULL; @@ -394,7 +394,8 @@ _nl_load_locale_from_archive (int category, const char **namep) if (fd == -1) { struct stat64 st; - fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE); + fd = open_not_cancel_2 (archfname, + O_RDONLY|O_LARGEFILE|O_CLOEXEC); if (fd == -1) /* Cannot open the archive, for whatever reason. */ return NULL; |