From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#52835: [PATCH 0/2] Fix spawning a child not setting standard fds properly Date: Thu, 12 Jan 2023 23:02:15 +0100 Message-ID: <871qnzh0ns.fsf@gnu.org> References: <87iligyyh9.fsf@gnu.org> <87y1qyz909.fsf_-_@gnu.org> <87v8m2jb3c.fsf@jpoiret.xyz> <87a63bxvxh.fsf@gnu.org> <878rie9vmi.fsf@jpoiret.xyz> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20123"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cc: 52835@debbugs.gnu.org, Timothy Sample To: Josselin Poiret Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Thu Jan 12 23:03:30 2023 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pG5fW-00050r-8J for guile-bugs@m.gmane-mx.org; Thu, 12 Jan 2023 23:03:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pG5f8-0000sE-TU; Thu, 12 Jan 2023 17:03:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pG5f4-0000rK-Tn for bug-guile@gnu.org; Thu, 12 Jan 2023 17:03:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pG5f4-0002dy-FY for bug-guile@gnu.org; Thu, 12 Jan 2023 17:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pG5f3-0003vu-W3 for bug-guile@gnu.org; Thu, 12 Jan 2023 17:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 12 Jan 2023 22:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52835 X-GNU-PR-Package: guile X-GNU-PR-Keywords: patch Original-Received: via spool by 52835-submit@debbugs.gnu.org id=B52835.167356094915076 (code B ref 52835); Thu, 12 Jan 2023 22:03:01 +0000 Original-Received: (at 52835) by debbugs.gnu.org; 12 Jan 2023 22:02:29 +0000 Original-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 Original-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 Original-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==; Original-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 In-Reply-To: <878rie9vmi.fsf@jpoiret.xyz> (Josselin Poiret's message of "Sat, 07 Jan 2023 17:07:01 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:10507 Archived-At: 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.