mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 09:11:07 -04:00
libc: Make various internal file descriptors close-on-exec.
These are obtained via fopen().
This commit is contained in:
parent
a36ffd6955
commit
07588bf421
2 changed files with 2 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue