Subject: Re: [PATCH] guix: inferior: Make open-bidirectional-pipe use piped-process.

From: Ludovic Courtès <[email-masked]>
Date: Sat, 28 May 2022 19:15:52 +0200

Hi,

Josselin Poiret <[email-masked]> 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’.