GNU bug report logs - #55441
Use of 'primitive-fork' in (guix inferior) leads to hangs in 'cuirass evaluate'

Previous Next

Package: guix;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Mon, 16 May 2022 03:50:02 UTC

Severity: important

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: 55441 <at> debbugs.gnu.org, Christopher Baines <mail <at> cbaines.net>
Subject: bug#55441: [PATCH] guix: inferior: Make open-bidirectional-pipe use piped-process.
Date: Sat, 28 May 2022 19:15:52 +0200
Hi,

Josselin Poiret <dev <at> jpoiret.xyz> 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’s using an internal function and
it’s too fragile (that C function is not meant to be called more than
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’.




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

Previous Next


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