bug#57567: ‘primitive-load’ should open files with O_CLOEXEC

Ludovic Courtès <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <[email protected]>
Ludovic Courtès <[email protected]> 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’.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.