From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Neale Pickett Newsgroups: gmane.lisp.guile.user Subject: open-input-pipe messes with output buffers Date: 29 Aug 2002 11:28:39 -0700 Organization: WoozleWorks (woozle.org) Sender: guile-user-admin@gnu.org Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1030645688 9316 127.0.0.1 (29 Aug 2002 18:28:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 29 Aug 2002 18:28:08 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17kU1Q-0002PQ-00 for ; Thu, 29 Aug 2002 20:28:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17kU2h-0006l6-00; Thu, 29 Aug 2002 14:29:19 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17kU2D-0006j2-00 for guile-user@gnu.org; Thu, 29 Aug 2002 14:28:49 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17kU2A-0006i3-00 for guile-user@gnu.org; Thu, 29 Aug 2002 14:28:48 -0400 Original-Received: from woozle.org ([216.231.62.189]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17kU29-0006gH-00 for guile-user@gnu.org; Thu, 29 Aug 2002 14:28:45 -0400 Original-Received: by woozle.org (Postfix, from userid 5000) id CDFC01A163; Thu, 29 Aug 2002 11:28:39 -0700 (PDT) Original-To: guile-user@gnu.org X-Face: "&g4:h\nuA>dfRaRmJ5c+Mqvu!,|5@dd>:BqJ,#G:mT3`i-EF{L>6oE?di}m\;Wil(?AS(@9j"G@o-UR8(BU$)u.%I;*K9%4Vj.fO$W9-bjxPgl%|#{^W@e#1/jZ@,G:>&;JzJrBqMqomx3Z#Hg.``g5v%R[+PzjYtAa&l@EtK{R<;.,gV`5$8Go1OJB=L`R(<)U$M4YK-t;a}oA1y([AV@r$%?AJW[:_|_*r44[Gl{3@:Ff6U9XFOJxp%lZWI-d0-1l5+6aMAOAT+Ac%q@E3t|:2;lpSwi=1"gf7g{Bz+U2MI X-Thought: Matt is now in my .signature file. X-PGP-Key-Fingerprint: A862 F105 13EF 7FAF 4F08 78B4 9168 856B 48BF F157 X-Callsign: KD7OQI Original-Lines: 39 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Errors-To: guile-user-admin@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.user:863 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:863 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