libc: Make various internal file descriptors close-on-exec.

These are obtained via fopen().
This commit is contained in:
Jilles Tjoelker 2012-12-11 22:52:56 +00:00
parent a36ffd6955
commit 07588bf421
2 changed files with 2 additions and 2 deletions

View file

@ -135,7 +135,7 @@ __collate_load_tables_l(const char *encoding, struct xlocale_collate *table)
(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) {

View file

@ -129,7 +129,7 @@ __setrunelocale(struct xlocale_ctype *l, const char *encoding)
(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) {