GNU bug report logs - #43364
Possible bug with output redirection

Previous Next

Package: guile;

Reported by: pinoaffe <pinoaffe <at> airmail.cc>

Date: Sat, 12 Sep 2020 21:00:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Tony Garnock-Jones <tonyg <at> leastfixedpoint.com>
To: Fabio Natali <me <at> fabionatali.com>, 43364 <at> debbugs.gnu.org
Subject: bug#43364: with-output-to-port works with file ports
Date: Wed, 24 Apr 2024 09:00:42 +0200
This is a nice idea. The way Racket does it is to make 
with-output-to-string cooperate with system:

    (with-output-to-string (lambda () (system "date")))

but a quick check shows that Guile does not yet have such cooperation in 
place. Would that be a good place to start looking?

Tony


On 23/04/2024 18:32, Fabio Natali wrote:
> Dear All 👋,
> 
> I've been encountering a few times the need for a procedure like
> 'system' or 'system*' but that might be capable of capturing the output
> of the program that's being called.
> 
> While this is something that can be solved with a simple 'open-pipe*'
> wrapper, the pattern seems relatively frequent in Guix, which is where I
> noticed it. I suggested that some variant of such a wrapper could be
> added to '(guix build utils)'⁰.
> 
> In reply to my post, it was brought to my attention that the problem
> might be addressed at the Guile level and pointed me to this bug report.
> 
> I thought of sending a quick follow-up here to see if there's any rough
> consensus on a possible way of addressing this - or why it might be
> difficult or potentially not worth the effort.
> 
> Thanks, all best, Fabio.
> 
> ⁰ https://lists.gnu.org/archive/html/guix-devel/2024-04/msg00199.html
> 
> 




This bug report was last modified 1 year and 50 days ago.

Previous Next


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