From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 12 17:02:29 2023 Received: (at 52835) by debbugs.gnu.org; 12 Jan 2023 22:02:29 +0000 Received: from localhost ([127.0.0.1]:48732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pG5eW-0003v4-VM for submit@debbugs.gnu.org; Thu, 12 Jan 2023 17:02:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pG5eU-0003ur-HM for 52835@debbugs.gnu.org; Thu, 12 Jan 2023 17:02:27 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pG5eO-0002Xk-Ts; Thu, 12 Jan 2023 17:02:20 -0500 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=Gc0W+otNtFbqzVAMSoJvmT3jC9asTNs1E7ZVCB64CWM=; b=JupFu9K5HGynjS1ZooAR mPE1HPjQbkWukKkb8UALwqSIFnRK2Xuy/HP5taprSnq2ScCXJkV7IONCHFVoc7AQZegUkmiTPelKJ su+9qu7l0575OmzgAT73WjkBhywjtN3xx0PmXbCGl9JVpyToGF8fW1khzfrFBNl57ehzopH4XpVFE FPwhMavyFHXZj5Rz5Spj6Us6Tf1bCuDyyEp07RQBKompT8/7JxFD5ezWyDYofRmp2ltr8MZ8ravNo KUhTh0O54bOldJptCOXa5Ya5cc3j51dN10qnKQEcH2Kg9yl4sJQEHMKmUOOISA0KOz91R0X4I78sD La5YV8pKZgliRA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pG5eM-0005Fq-Fs; Thu, 12 Jan 2023 17:02:20 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Josselin Poiret Subject: Re: bug#52835: [PATCH 0/2] Fix spawning a child not setting standard fds properly References: <87iligyyh9.fsf@gnu.org> <87y1qyz909.fsf_-_@gnu.org> <87v8m2jb3c.fsf@jpoiret.xyz> <87a63bxvxh.fsf@gnu.org> <878rie9vmi.fsf@jpoiret.xyz> Date: Thu, 12 Jan 2023 23:02:15 +0100 In-Reply-To: <878rie9vmi.fsf@jpoiret.xyz> (Josselin Poiret's message of "Sat, 07 Jan 2023 17:07:01 +0100") Message-ID: <871qnzh0ns.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52835 Cc: 52835@debbugs.gnu.org, Timothy Sample X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Josselin, and a happy new year full of good hacks! :-) Josselin Poiret skribis: > I've done the above by using the C functions to bind keyword arguments, > and added the #:use-path? keyword argument. One annoying thing though > is that since it uses keyword arguments, the first line of the > documentation generated by SCM_DEFINE only mentions "spawn program > . keyword_args". That=E2=80=99s OK. > I've opted to put it right below primitive-fork, and slightly rewrite > the part about pipes in primitive-fork's description to also mention > spawn. Let me know if the documentation is not descriptive enough. It looks good to me. A few suggestions of mine got lost, so I pushed a new =E2=80=98wip-posix-sp= awn=E2=80=99 with additional commits taking those into account and adding tests. The changes in this v8.1 are: - make 'arguments' positional rather than keyword - rename keyword arguments to avoid abbreviations - add example in the manual - mark 'scm_spawn_process' as SCM_INTERNAL - add tests Because this is now a core binding and no longer in (ice-9 spawn), I hope =E2=80=98spawn=E2=80=99 is not clashing with someone else=E2=80=99s li= brary, though the worst that could happen is a run-time warning =E2=80=9Cmodule X overrides c= ore binding 'spawn'=E2=80=9D. I=E2=80=99m very pleased with the branch and could finally merge if you agr= ee! (I=E2=80=99ll put myself as co-author and take the blame for half of the bu= gs. :-)) Ah yes, one thing that came to mind: we could change #:input #f to mean =E2=80=9Cclose file descriptor 0=E2=80=9D, and so on. Let=E2=80=99s first = merge this, though. Thoughts? Ludo=E2=80=99.