guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help needed with stderr redirection


From: Josselin Poiret
Subject: Re: help needed with stderr redirection
Date: Sat, 22 Oct 2022 10:23:28 +0200

Hi,

Csepp <raingloom@riseup.net> writes:

> I looked in the Guix sources to see how others do it and found mention
> of a possibly related bug:
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52835
> Is that still relevant?  Because debuggs is just, khm, great, I don't
> see any clear indication of what its status is.

>From what I understand this bug is still relevant.  This would affect
you here if your current-error-port has a fd <= 2 when using open-pipe.
However, here you're redirecting the error port to the output port's
value before opening the pipe, so the result is expected!  You can have
a look at gnu/installer/utils.scm in Guix to see how we're doing it
right now, beware, it's hackish (we don't actually use the pipe to
redirect at all, instead relying on the newly spawned process reusing
the current-input/output/error-port).

The patch I posted last in the debbugs report above should add a new
primitive that would let us redirect all of stdin/out/err independently.

Best,
-- 
Josselin Poiret



reply via email to

[Prev in Thread] Current Thread [Next in Thread]