From: "Ludovic Courtès" <ludo@gnu.org>
To: 57567-done@debbugs.gnu.org
Subject: bug#57567: ‘primitive-load’ should open files with O_CLOEXEC
Date: Wed, 07 Sep 2022 18:03:16 +0200 [thread overview]
Message-ID: <87czc7qiij.fsf@gnu.org> (raw)
In-Reply-To: <877d2ktg6b.fsf@inria.fr> ("Ludovic Courtès"'s message of "Sat, 03 Sep 2022 21:24:12 +0200")
Ludovic Courtès <ludo@gnu.org> skribis:
> Currently ‘primitive-load’ opens files without O_CLOEXEC:
>
> port = scm_open_file_with_encoding (filename,
> scm_from_latin1_string ("r"),
> SCM_BOOL_T, /* guess_encoding */
> scm_from_latin1_string ("UTF-8"));
[...]
> For a proper fix, one possibility would be to first augment
> ‘scm_i_mode_to_open_flags’ to recognize some letter for O_CLOEXEC. In
> glibc, fopen(3) uses “e” for that.
I went ahead and did that:
0aa1a9976 'primitive-load' opens files with O_CLOEXEC.
a356ceebe Add support for "e" flag (O_CLOEXEC) to 'open-file'.
Ludo’.
prev parent reply other threads:[~2022-09-07 16:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-03 19:24 bug#57567: ‘primitive-load’ should open files with O_CLOEXEC Ludovic Courtès
2022-09-07 16:03 ` Ludovic Courtès [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87czc7qiij.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=57567-done@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).