From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wGWLNRlZkmLa1AAAbAwnHQ (envelope-from ) for ; Sat, 28 May 2022 19:17:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aLB6NRlZkmIx9gAA9RJhRA (envelope-from ) for ; Sat, 28 May 2022 19:17:13 +0200 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 C3257331A7 for ; Sat, 28 May 2022 19:17:12 +0200 (CEST) Received: from localhost ([::1]:56524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nv03r-0005Ai-UR for larch@yhetil.org; Sat, 28 May 2022 13:17:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nv03i-00058u-Bm for bug-guix@gnu.org; Sat, 28 May 2022 13:17:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44931) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nv03i-0001yC-3M for bug-guix@gnu.org; Sat, 28 May 2022 13:17:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nv03h-00024d-Vb for bug-guix@gnu.org; Sat, 28 May 2022 13:17:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#55441: [PATCH] guix: inferior: Make open-bidirectional-pipe use piped-process. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 28 May 2022 17:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55441 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Josselin Poiret Cc: 55441@debbugs.gnu.org, Christopher Baines Received: via spool by 55441-submit@debbugs.gnu.org id=B55441.16537581647881 (code B ref 55441); Sat, 28 May 2022 17:17:01 +0000 Received: (at 55441) by debbugs.gnu.org; 28 May 2022 17:16:04 +0000 Received: from localhost ([127.0.0.1]:38822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nv02m-000233-Hh for submit@debbugs.gnu.org; Sat, 28 May 2022 13:16:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nv02i-00022O-9e for 55441@debbugs.gnu.org; Sat, 28 May 2022 13:16:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59774) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nv02c-0001tr-Ue; Sat, 28 May 2022 13:15:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=uFjOD3MUq/scYgp+dmb/nUAzbix+2kxtbaEgpgC7nj0=; b=P2hyTOwVYKG0GLRtNzLd 52kd9Kcvc9qlnAezOtB2FsvFJsh/C+tArpO8+Y/LnkHbtdJeBDXUcPRJzhbRWf/1xJL/QCJqO27x2 huij8DrsOwSmq1m7m1Cl6DwaieNPgOCnn11MNmYsyMeyRYgLmqrM6dsYfeKhIXpDpjEWnPpRDM9ae NkMc7kuwFdGWATbzOXnR/0V6uM1CislpxaMaRhKoBAajDbEZ03rFt10hJuqusPZxsHdg7U4tL/Ond ujWpqDQKyRp8jO1Ik0xyVcHrvKyDna7ktAJmBn39UrtxHwbH6uqRybc6fiBSNivunq5Acfz7wCJQB Fi1dxBa1j/1gcQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:52050 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nv02c-0000ta-Im; Sat, 28 May 2022 13:15:54 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87sfow10lc.fsf@jpoiret.xyz> <20220526205016.23899-1-dev@jpoiret.xyz> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 9 Prairial an 230 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 28 May 2022 19:15:52 +0200 In-Reply-To: <20220526205016.23899-1-dev@jpoiret.xyz> (Josselin Poiret's message of "Thu, 26 May 2022 22:50:16 +0200") Message-ID: <87h759bmt3.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653758232; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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=uFjOD3MUq/scYgp+dmb/nUAzbix+2kxtbaEgpgC7nj0=; b=A0LSdlw54rDk/g7baR8i7FQjanUJjUR/I3rajOVWCwlFFtAhD6+n8WumyKPZU77fQ/PNuP dFhdG4C7mJWogTq9w6QidwBI0TwPcX+Bn2WFoj3rTimCSWb9OnBj+Z/zNDaBVO3vkATGeh Dawo5CF8j8phkVLkmZth1zV02EevsdEFexAagOGLotl5KaDpJdiaMRQ/PLsBKWT8sonGN0 gzTb48V1BeRRh6lhvvmnlag0ouHmasokIBN+q2YfwEtz6o5FjeOwwPCkJ5bXoq9thYTlcx wZVl9Y44bf9paCUjsZg+PfEY2CB2JbDOpczWjl4H+cdtiKxXbcAlNVHmCbGisQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653758232; a=rsa-sha256; cv=none; b=dsBKD0hXClkYC42WqUcz6nMR03vTLl5mLkj2i0twgm8jsJ60GKm9TiUUuxIoRtqi8GjNdz ovnKM5G0f+dnCUcJfh4xzxPl9GrXkPVEFFqh6okpAtsAhSqieZB3F0eCxA6Gez6byQpEMY 4gw2R6k1Tgw4r5ogWJrv5CMovtn8+DWrQnT9aWgd6qMqWh3AjBuY4Mr63uQWxUk6wyl4h3 G2vlN6Qnj0GedGdh2g0F6Jjz0XhRyFFQ57LaB/MO/7Fju7bW2TrdAs5q72jv53h9r6HOPR xEz1l1G3S9XOQBjxSztCve7P7v6njZ42fTo86NJ+iQJJ6CiwVTcjBtX2sOtQsA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=P2hyTOwV; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.94 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=P2hyTOwV; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C3257331A7 X-Spam-Score: -3.94 X-Migadu-Scanner: scn1.migadu.com X-TUID: rxLlWVYCDslM Hi, Josselin Poiret skribis: > * guix/inferior.scm: Load up scm_init_popen extension to be able to > use piped-process. > (open-bidirectional-pipe): Remove custom fork+exec code and use > piped-process instead. [...] > +(eval-when (expand load eval) > + (load-extension (string-append "libguile-" (effective-version)) > + "scm_init_popen")) To me this is not an option because it=E2=80=99s using an internal function= and it=E2=80=99s too fragile (that C function is not meant to be called more th= an once). That said, I agree that in principle we should be doing something along these lines: calling out to a C function that does fork+dup+exec in a safe way. Thanks for looking into this! Ludo=E2=80=99.