From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.user Subject: Re: Two way pipe Date: Thu, 26 Apr 2007 21:49:42 +0100 Message-ID: <87k5vy3lp5.fsf@ossau.uklinux.net> References: <87k5vz7fsb.fsf@ossau.uklinux.net> <87y7kfnx0e.fsf@laas.fr> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1177620596 4199 80.91.229.12 (26 Apr 2007 20:49:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 26 Apr 2007 20:49:56 +0000 (UTC) To: Guile Users Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Apr 26 22:49:53 2007 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HhAuX-0007Fl-GN for guile-user@m.gmane.org; Thu, 26 Apr 2007 22:49:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HhB0J-0005lu-3I for guile-user@m.gmane.org; Thu, 26 Apr 2007 16:55:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HhB0D-0005lX-9y for guile-user@gnu.org; Thu, 26 Apr 2007 16:55:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HhB0B-0005lI-VE for guile-user@gnu.org; Thu, 26 Apr 2007 16:55:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HhB0B-0005lF-N7 for guile-user@gnu.org; Thu, 26 Apr 2007 16:55:43 -0400 Original-Received: from mail3.uklinux.net ([80.84.72.33]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HhAuP-0001iB-8U for guile-user@gnu.org; Thu, 26 Apr 2007 16:49:45 -0400 Original-Received: from laruns (host86-149-177-196.range86-149.btcentralplus.com [86.149.177.196]) by mail3.uklinux.net (Postfix) with ESMTP id 3301540A965 for ; Thu, 26 Apr 2007 20:49:44 +0000 (UTC) Original-Received: from laruns (laruns [127.0.0.1]) by laruns (Postfix) with ESMTP id 1614B6F92F for ; Thu, 26 Apr 2007 21:49:43 +0100 (BST) In-Reply-To: <87y7kfnx0e.fsf@laas.fr> ( =?iso-8859-1?q?Ludovic_Court=E8s's_message_of?= "Thu, 26 Apr 2007 14:25:05 +0200") User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) X-detected-kernel: Linux 2.4-2.6 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:5932 Archived-At: ludovic.courtes@laas.fr (Ludovic Court=E8s) writes: > Doesn't `OPEN_BOTH' do what you want?=20 Yes, indeed. Believe it or not, I was looking at a 1.6 distribution and didn't think to check 1.8 or CVS. (Newbie alert! :-)) > However, the manual reads: > > Care should be taken with `OPEN_BOTH', a deadlock will occur if > both parent and child are writing, and waiting until the write > completes before doing any reading. Each direction has `PIPE_BUF' > bytes of buffering (*note Ports and File Descriptors::), which > will be enough for small writes, but not for say putting a big > file through a filter. So far I've been playing with (open-input-pipe "mplayer -slave ..."), but not bothering to select on and read from the pipe. If the track being played is longer than about 3 minutes, mplayer crashes - and I assume that's because its write to stdout is failing unexpectedly. So for some programs, it seems that filling up the pipe buffer can be a problem even if in only one direction. When I implement things fully this won't be a problem, because the Guile app will be reading any available data from the pipe as soon as it's there, and only very rarely writing anything. Many thanks, Neil _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user