From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qJlKAHZy12EJUAAAgWs5BA (envelope-from ) for ; Thu, 06 Jan 2022 23:51:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id cA5/NHVy12HMzgAAG6o9tA (envelope-from ) for ; Thu, 06 Jan 2022 23:51:33 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9F6A8367A0 for ; Thu, 6 Jan 2022 23:51:33 +0100 (CET) Received: from localhost ([::1]:48584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n5bbY-0002gC-Sc for larch@yhetil.org; Thu, 06 Jan 2022 17:51:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5bZA-0007Rk-PB for guix-patches@gnu.org; Thu, 06 Jan 2022 17:49:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:49728) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n5bZA-00075A-EW for guix-patches@gnu.org; Thu, 06 Jan 2022 17:49:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n5bZA-00005e-E4 for guix-patches@gnu.org; Thu, 06 Jan 2022 17:49:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53063] [PATCH wip-harden-installer 06/14] installer: Disable automatic finalization for child thread. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 06 Jan 2022 22:49:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53063 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53063@debbugs.gnu.org Cc: Josselin Poiret Received: via spool by 53063-submit@debbugs.gnu.org id=B53063.164150932332671 (code B ref 53063); Thu, 06 Jan 2022 22:49:04 +0000 Received: (at 53063) by debbugs.gnu.org; 6 Jan 2022 22:48:43 +0000 Received: from localhost ([127.0.0.1]:42606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5bYo-0008Uf-FM for submit@debbugs.gnu.org; Thu, 06 Jan 2022 17:48:42 -0500 Received: from jpoiret.xyz ([206.189.101.64]:36230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5bYk-0008Td-6K for 53063@debbugs.gnu.org; Thu, 06 Jan 2022 17:48:38 -0500 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 66DA1184D98; Thu, 6 Jan 2022 22:48:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1641509317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FawzilmUJRjYzPcDHIlO5KnIPwKIRLaQUPxbldhYm5s=; b=cegc3RGI3/89zAXe4zxMw/wnGHEXsoY+YP++sEnCJcSo3zG73saHIykw6Z9I0Mo4wkUFNO +KKCeiXjMKnYrpBSiVG6KLYYLOIkBGtI1ymaUDi0qKkrx5tquJJqw9jotxyHhSbNX4Gnkn eL+95aPHyfFIVSfCro3/6iGRkrnsHl574fc+zQHMRJfItJzaSQbPu+hxkA3yc5Q6Eg9ip7 tLCUCGSAMxv/RMGdQlb87bwSHLO0ifB6aRbPahzRkUoh0MTgKdT9BPufNdJOkugjsAvxwk c73NjfZ8rN0SofuMMoycT6ysI+5+31aI+7JsxztUjysfT0AjqWOdX+IKibaZpA== Date: Thu, 6 Jan 2022 23:48:04 +0100 Message-Id: <17c53526bb7d92f07515a6c2cc165e717aa21346.1641507696.git.dev@jpoiret.xyz> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches From: Josselin Poiret via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641509493; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=FawzilmUJRjYzPcDHIlO5KnIPwKIRLaQUPxbldhYm5s=; b=VrvlKW8t+jG0fAw+2rvNFHbIBFmmXVdRae6e4OIrU10IEWpr27QGlUYgif6tT7CthW4mAB MTrxh7RBo6zA15RHLx4DLKJgg6pSMAuK4KCeT74FvMwGqEockoMUiqMCAEN/wrtQd6s4VF DzC0AEupCinJlrCyrVBclve4YwPX8V5vYHQoPAn7QJbmsN3JdYXzDEQ7i5CcU88gFyi0pH tEcShSOtPxf85NGJmgwoGvTmEvuU9w4QbbrYbPQTqXl1AtFhRiF0iP3PPs26D9TtbIMzWO gBMqvonWHAVpK8D2fqEGNmug+PCYHrIN+7mO3IEnJceobsthvVDpsoD8dOQuXg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641509493; a=rsa-sha256; cv=none; b=afjQWrhlOgFj2AQ9StTPfTFmEl97co0E6xNI7NCvse1vD72OMUKAu+39YLzqD1H4QRIUM1 CPZqhHbsrNYiw3XXNaj3h5WfRJ+Vl8O1vrfEJ9R9VKhePArZ8x1RvdzUbDdLUj0v6wrq6B rMjJyl8eg9oxXjtrR3WAs9Da4wndOsUSB+RlID/w0zUIRvRix1KnJKfJg2Ns3J+0qecVPA bzqssBHAKITr/3Wt/CShHGa5JDib8ahEcgkqomtJjokgNtDvRslBfjGi+OJGeb1sSloddt zsnZkBCsWYe9f7psXfwfik6n8171MGi65jeCo1MjUpD2si/Vi0QP73CuE/sM1A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=cegc3RGI; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.90 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=cegc3RGI; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 9F6A8367A0 X-Spam-Score: -3.90 X-Migadu-Scanner: scn0.migadu.com X-TUID: bW7wVLdWl2FV * 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