GNU bug report logs - #52835
[PATCH 0/2] Fix spawning a child not setting standard fds properly

Previous Next

Package: guile;

Reported by: Josselin Poiret <dev <at> jpoiret.xyz>

Date: Mon, 27 Dec 2021 21:27:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Josselin Poiret <dev <at> jpoiret.xyz>
Cc: 52835 <at> debbugs.gnu.org, Timothy Sample <samplet <at> ngyro.com>
Subject: bug#52835: [PATCH 0/2] Fix spawning a child not setting standard fds properly
Date: Thu, 12 Jan 2023 23:02:15 +0100
Hi Josselin, and a happy new year full of good hacks!  :-)

Josselin Poiret <dev <at> jpoiret.xyz> 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’s 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 ‘wip-posix-spawn’
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 ‘spawn’ is not clashing with someone else’s library, though the
worst that could happen is a run-time warning “module X overrides core
binding 'spawn'”.

I’m very pleased with the branch and could finally merge if you agree!
(I’ll put myself as co-author and take the blame for half of the bugs.
:-))

Ah yes, one thing that came to mind: we could change #:input #f to mean
“close file descriptor 0”, and so on.  Let’s first merge this, though.

Thoughts?

Ludo’.




This bug report was last modified 2 years and 127 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.