groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] [off] micro-typography


From: ralph
Subject: Re: [Groff] [off] micro-typography
Date: Wed, 13 Feb 2002 16:10:07 +0000

Hi,

Ted wrote:
> On this general question: Is there any problem with getting groff
> simply to open a pair of named pipes using 'mkfifo', reading from
> one, writing to the other, and invoking the user's favorite program
> to write to and read fromthe other ends of the pipes?

No problem, I'd have thought.

Thomas Baruchel wrote:
> I don't completely agree. Of course you can do this in many cases,
> but it isn't very clean and therefore you have some exceptions. I
> don't see for the moment an unix language interpreter that couldn't
> do that, but I have in mind the difficulty to do that with the unix
> 'dc' calculator. If you try to launch it from a process and write on
> its stdin, you will not have the evaluations on stdout. I don't
> remember exactly why; it probably has to do with some termios stuff.

It's simply C's stdio buffering becoming visible.  In order to use two
pipes for two-way communication (or a socket -- there's no particular
difference) both writers need to be able to `flush' their output to
ensure it is written (write(2)) down a pipe before they await further
input.


Ralph.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]