From: Neil Jerram <neil@ossau.uklinux.net>
To: Guile Users <guile-user@gnu.org>
Subject: Re: Two way pipe
Date: Thu, 26 Apr 2007 21:49:42 +0100 [thread overview]
Message-ID: <87k5vy3lp5.fsf@ossau.uklinux.net> (raw)
In-Reply-To: <87y7kfnx0e.fsf@laas.fr> ( Ludovic Courtès's message of "Thu, 26 Apr 2007 14:25:05 +0200")
ludovic.courtes@laas.fr (Ludovic Courtès) writes:
> Doesn't `OPEN_BOTH' do what you want?
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
next prev parent reply other threads:[~2007-04-26 20:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-26 7:31 Two way pipe Neil Jerram
2007-04-26 12:25 ` Ludovic Courtès
2007-04-26 20:49 ` Neil Jerram [this message]
2007-04-27 8:09 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k5vy3lp5.fsf@ossau.uklinux.net \
--to=neil@ossau.uklinux.net \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).