unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Josselin Poiret <dev@jpoiret.xyz>
To: Csepp <raingloom@riseup.net>, guile-devel@gnu.org
Subject: Re: help needed with stderr redirection
Date: Sat, 22 Oct 2022 10:23:28 +0200	[thread overview]
Message-ID: <87y1t88dxb.fsf@jpoiret.xyz> (raw)
In-Reply-To: <875ygceop6.fsf@riseup.net>

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



      parent reply	other threads:[~2022-10-22  8:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21 23:29 help needed with stderr redirection Csepp
2022-10-22  6:26 ` tomas
2022-10-22  8:23 ` Josselin Poiret [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y1t88dxb.fsf@jpoiret.xyz \
    --to=dev@jpoiret.xyz \
    --cc=guile-devel@gnu.org \
    --cc=raingloom@riseup.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).