Re: Trouble with UNIX pipes
From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 03/31/04
- Next message: Barry Margolin: "Re: command not found -- autoconf"
- Previous message: Pascal Bourguignon: "Re: extended character filenames"
- In reply to: Gergely Korodi: "Trouble with UNIX pipes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 31 Mar 2004 00:56:54 -0500
In article <c4cp97$n3d$1@news.cc.tut.fi>,
Gergely Korodi <gergely.korodi@tut.fi> wrote:
> Hi,
>
> I'm trying to write a front-end for programs that read their standard
> input and write the result to standard output. I'd do this by forking a
> process and exec'ing the program; communication would be done by
> anonymous pipes (my first try). Yet nothing seems to work, as if the
> pipes would stall indefinitely (exact error seems to depend on what
> program I actually call. Sometimes one cycle of reading-writing works,
> but nothing more).
The program you're running probably uses stdio, and by default stdout is
fully buffered. This means that it doesn't send anything to the pipe
until the stdio buffer is filled, and the buffer size is typically
something like 4K bytes.
-- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***
- Next message: Barry Margolin: "Re: command not found -- autoconf"
- Previous message: Pascal Bourguignon: "Re: extended character filenames"
- In reply to: Gergely Korodi: "Trouble with UNIX pipes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|