svn commit: r244126 - head/lib/libc/locale
Jilles Tjoelker
jilles at FreeBSD.org
Tue Dec 11 22:52:57 UTC 2012
Author: jilles
Date: Tue Dec 11 22:52:56 2012
New Revision: 244126
URL: http://svnweb.freebsd.org/changeset/base/244126
Log:
libc: Make various internal file descriptors close-on-exec.
These are obtained via fopen().
Modified:
head/lib/libc/locale/collate.c
head/lib/libc/locale/setrunelocale.c
Modified: head/lib/libc/locale/collate.c
==============================================================================
--- head/lib/libc/locale/collate.c Tue Dec 11 20:38:53 2012 (r244125)
+++ head/lib/libc/locale/collate.c Tue Dec 11 22:52:56 2012 (r244126)
@@ -135,7 +135,7 @@ __collate_load_tables_l(const char *enco
(void)strcat(buf, "/");
(void)strcat(buf, encoding);
(void)strcat(buf, "/LC_COLLATE");
- if ((fp = fopen(buf, "r")) == NULL)
+ if ((fp = fopen(buf, "re")) == NULL)
return (_LDP_ERROR);
if (fread(strbuf, sizeof(strbuf), 1, fp) != 1) {
Modified: head/lib/libc/locale/setrunelocale.c
==============================================================================
--- head/lib/libc/locale/setrunelocale.c Tue Dec 11 20:38:53 2012 (r244125)
+++ head/lib/libc/locale/setrunelocale.c Tue Dec 11 22:52:56 2012 (r244126)
@@ -129,7 +129,7 @@ __setrunelocale(struct xlocale_ctype *l,
(void) strcat(name, encoding);
(void) strcat(name, "/LC_CTYPE");
- if ((fp = fopen(name, "r")) == NULL)
+ if ((fp = fopen(name, "re")) == NULL)
return (errno == 0 ? ENOENT : errno);
if ((rl = _Read_RuneMagi(fp)) == NULL) {
More information about the svn-src-head
mailing list