[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 03/03: 'primitive-load' opens files with O_CLOEXEC.
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] 03/03: 'primitive-load' opens files with O_CLOEXEC. |
Date: |
Wed, 7 Sep 2022 12:02:21 -0400 (EDT) |
civodul pushed a commit to branch main
in repository guile.
commit 0aa1a9976fc3c6af4d1087e59d728cb8fe7d369a
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Sep 7 17:58:40 2022 +0200
'primitive-load' opens files with O_CLOEXEC.
Fixes <https://bugs.gnu.org/57567>.
* libguile/load.c (scm_primitive_load): Add "e" flag to
'scm_open_file_with_encoding' argument.
* NEWS: Update.
---
NEWS | 2 ++
libguile/load.c | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index dfe1895ee..05bd1f6e5 100644
--- a/NEWS
+++ b/NEWS
@@ -52,6 +52,8 @@ for use with `setsockopt'.
** (web http) terminates chunked encoding with an extra \r\n
** (web client) retries TLS handshake upon non-fatal errors
(<https://bugs.gnu.org/49223>)
+** 'primitive-load' opens files as O_CLOEXEC
+ (<https://bugs.gnu.org/57567>)
Changes in 3.0.8 (since 3.0.7)
diff --git a/libguile/load.c b/libguile/load.c
index e95c36db1..bc254260e 100644
--- a/libguile/load.c
+++ b/libguile/load.c
@@ -1,4 +1,4 @@
-/* Copyright 1995-1996,1998-2001,2004,2006,2008-2019
+/* Copyright 1995-1996,1998-2001,2004,2006,2008-2019,2022
Free Software Foundation, Inc.
This file is part of Guile.
@@ -106,7 +106,7 @@ SCM_DEFINE (scm_primitive_load, "primitive-load", 1, 0, 0,
SCM port;
port = scm_open_file_with_encoding (filename,
- scm_from_latin1_string ("r"),
+ scm_from_latin1_string ("re"),
SCM_BOOL_T, /* guess_encoding */
scm_from_latin1_string ("UTF-8"));