[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#53063] [PATCH wip-harden-installer 06/14] installer: Disable automa
From: |
Josselin Poiret |
Subject: |
[bug#53063] [PATCH wip-harden-installer 06/14] installer: Disable automatic finalization for child thread. |
Date: |
Thu, 6 Jan 2022 23:48:04 +0100 |
* gnu/installer/utils.scm (run-external-command-with-handler): Disable
finalization manually, to avoid having the finalizer thread spout
"error in finalization thread: Success".
---
gnu/installer/utils.scm | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/gnu/installer/utils.scm b/gnu/installer/utils.scm
index 878434f074..ad220492d9 100644
--- a/gnu/installer/utils.scm
+++ b/gnu/installer/utils.scm
@@ -32,6 +32,8 @@ (define-module (gnu installer utils)
#:use-module (ice-9 regex)
#:use-module (ice-9 format)
#:use-module (ice-9 textual-ports)
+ #:use-module (system foreign)
+ #:use-module (system foreign-library)
#:export (read-lines
read-all
nearest-exact-integer
@@ -143,6 +145,14 @@ (define* (run-external-command-with-handler handler
command)
(match (primitive-fork)
(0 ;; We're in the child
(close-port input)
+ ;; XXX: Disable automatic finalization because we're going to exec.
+ ;; Might become unnecessary with newer Guile versions, as the
+ ;; *possible* finalization thread may stop properly when its pipe is
+ ;; closed.
+ ((foreign-library-function (load-foreign-library #f)
+ "scm_set_automatic_finalization_enabled"
+ #:return-type int
+ #:arg-types (list int)) 0)
(reset-fds
(open-fdes "/dev/null" O_WRONLY)
;; Avoid port GC'ing closing the fd by increasing its revealed count.
--
2.34.0
- [bug#53063] [PATCH wip-harden-installer 00/14] General improvements to the installer, Josselin Poiret, 2022/01/06
- [bug#53063] [PATCH wip-harden-installer 01/14] installer: Use define instead of let at top-level., Josselin Poiret, 2022/01/06
- [bug#53063] [PATCH wip-harden-installer 04/14] installer: Un-export syslog syntax., Josselin Poiret, 2022/01/06
- [bug#53063] [PATCH wip-harden-installer 02/14] installer: Generalize logging facility., Josselin Poiret, 2022/01/06
- [bug#53063] [PATCH wip-harden-installer 03/14] installer: Use new installer-log-line everywhere., Josselin Poiret, 2022/01/06
- [bug#53063] [PATCH wip-harden-installer 05/14] installer: Capture external commands output., Josselin Poiret, 2022/01/06
- [bug#53063] [PATCH wip-harden-installer 06/14] installer: Disable automatic finalization for child thread.,
Josselin Poiret <=
- [bug#53063] [PATCH wip-harden-installer 07/14] installer: Add installer-specific run command process., Josselin Poiret, 2022/01/06
- [bug#53063] [PATCH wip-harden-installer 08/14] installer: Use run-command-in-installer in (gnu installer parted)., Josselin Poiret, 2022/01/06
- [bug#53063] [PATCH wip-harden-installer 08/14] installer: Use run-command-in-installer in (gnu installer parted)., Mathieu Othacehe, 2022/01/07
- [bug#53063] [PATCH wip-harden-installer 08/14] installer: Use run-command-in-installer in (gnu installer parted)., Josselin Poiret, 2022/01/07
- [bug#53063] [PATCH v2 wip-harden-installer 00/18] General improvements to the installer, Josselin Poiret, 2022/01/15
- [bug#53063] [PATCH v2 wip-harden-installer 04/18] installer: Un-export syslog syntax., Josselin Poiret, 2022/01/15
- [bug#53063] [PATCH v2 wip-harden-installer 03/18] installer: Use new installer-log-line everywhere., Josselin Poiret, 2022/01/15
- [bug#53063] [PATCH v2 wip-harden-installer 08/18] installer: Add installer-specific run command process., Josselin Poiret, 2022/01/15
- [bug#53063] [PATCH v2 wip-harden-installer 06/18] installer: Remove specific logging code., Josselin Poiret, 2022/01/15
- [bug#53063] [PATCH v2 wip-harden-installer 13/18] installer: Add nano to PATH., Josselin Poiret, 2022/01/15