From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:45785) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHOow-0001Gr-Vc for guix-patches@gnu.org; Thu, 26 Mar 2020 05:29:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jHOow-0001fN-1q for guix-patches@gnu.org; Thu, 26 Mar 2020 05:29:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52129) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jHOov-0001fA-Ui for guix-patches@gnu.org; Thu, 26 Mar 2020 05:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jHOov-0003Jq-R4 for guix-patches@gnu.org; Thu, 26 Mar 2020 05:29:01 -0400 Subject: [bug#34638] [PATCH v2 2/4] linux-container: Add 'start-child-in-container'. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20190419140427.15183-1-mail@cbaines.net> <20190419140427.15183-2-mail@cbaines.net> Date: Thu, 26 Mar 2020 10:28:18 +0100 In-Reply-To: <20190419140427.15183-2-mail@cbaines.net> (Christopher Baines's message of "Fri, 19 Apr 2019 15:04:25 +0100") Message-ID: <87ftdvea8d.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Christopher Baines Cc: 34638@debbugs.gnu.org Christopher Baines skribis: > This new procedure is similar to open-pipe* in (ice-9 popen), but using > run-container from (gnu build linux-container). > > * gnu/build/linux-container.scm (start-child-in-container): New procedure. [...] > +(define* (start-child-in-container command > + #:key read? write? > + (root 'temporary) > + (mounts '()) > + (namespaces %namespaces) > + (host-uids 1) > + (extra-environment-variables '())) Please add a docstring. :-) I=E2=80=99d change (extra-environment-variables '()) to: (environment-variables (environ)) I always find it too hard to reason about =E2=80=9Cextra=E2=80=9D thing; it= =E2=80=99s just more convenient as an interface to specify the whole thing rather than a list of =E2=80=9Cextras=E2=80=9D. > + (apply execlp command)) To provide a correct argv[0] by default, you should probably change it to: (match command ((program arguments ...) (execlp program program arguments))) (That=E2=80=99ll also address a comment of yours in one of the subsequent patches.) Could you add a test to =E2=80=98tests/containers.scm=E2=80=99? Thanks, Ludo=E2=80=99.