unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#39610: R6RS `flush-output-port` not playing along with `transcoded-port`
@ 2020-02-15  0:08 Andreas Rottmann
  2020-02-15 10:27 ` Andreas Rottmann
  2020-02-15 13:37 ` Andreas Rottmann
  0 siblings, 2 replies; 7+ messages in thread
From: Andreas Rottmann @ 2020-02-15  0:08 UTC (permalink / raw)
  To: 39610

Hi fellow Schemers!

I was gently nudged on IRC into having a look into my Scheme code, after
many years of abandon, and found that `dorodango` (a reasonably large
body of R6RS code) hangs with Guile 2.2 and 3.0, while it worked on 2.0
(IIRC). I isolated the cause; the following snippet hangs on Guile 2.2
and 3.0, while it worked as expected on 2.0:

;; ------------------
(import (rnrs))

(let* ((p (pipe))
       (in (car p))
       (out (transcoded-port (cdr p) (make-transcoder (utf-8-codec)))))
  (put-datum out "foo")
  (flush-output-port out)
  (display "Should have written to pipe by now, attempting reading a byte\n")
  (display "Got")
  (display (get-u8 in))
  (newline))
;; -------------------

It seems the underlying port is no longer flushed to the OS, so the
`get-u8` now hangs waiting for input, starting with Guile 2.2.

Regards, Rotty






^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-03-29 21:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-15  0:08 bug#39610: R6RS `flush-output-port` not playing along with `transcoded-port` Andreas Rottmann
2020-02-15 10:27 ` Andreas Rottmann
2020-03-21 17:55   ` Ludovic Courtès
2020-03-22 22:50     ` Andreas Rottmann
2020-03-23  9:22       ` Ludovic Courtès
2020-03-29 21:15         ` Andreas Rottmann
2020-02-15 13:37 ` Andreas Rottmann

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).