* open-input-pipe messes with output buffers
@ 2002-08-29 18:28 Neale Pickett
2002-08-29 20:11 ` Thien-Thi Nguyen
0 siblings, 1 reply; 2+ messages in thread
From: Neale Pickett @ 2002-08-29 18:28 UTC (permalink / raw)
I'm experiencing some strange behavior using open-input-pipe while
having open output ports. It seems like whenever I call
open-input-pipe, whatever's in the output buffer gets re-buffered, so I
get an additional copy in the output port.
For example, this guile program:
(use-modules (ice-9 popen))
(let ((outp (open-output-file "goo")))
(display "foobie" outp)
(newline outp)
;;(flush-all-ports)
(let ((jh (open-input-pipe "/bin/ls")))
(display (read-line jh) outp)
(newline outp))
(display "shoobie" outp)
(newline outp))
Produces this in the file "goo":
foobie
foobie
a.py
shoobie
Uncommenting the (flush-all-ports) line does what I expected with it
commented:
foobie
a.py
shoobie
Is this the desired behavior? It's pretty confusing to me, but I've only
been using guile for a month :)
Thanks
Neale
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-08-29 20:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-29 18:28 open-input-pipe messes with output buffers Neale Pickett
2002-08-29 20:11 ` Thien-Thi Nguyen
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).