How do I keep a pipe from buffering I/O?

Dan Bernstein brnstnd at kramden.acf.nyu.edu
Wed Feb 27 17:35:04 AEST 1991


In article <1991Feb27.014643.7915 at convex.com> tchrist at convex.COM (Tom Christiansen) writes:
> : How do I force the pipes to pass on text one line at a time?
> You must have control of the program that's doing the output.  If you
> don't have that program's source code, you're out of luck.

Uh, no. On BSD machines you just run ``pty program'' instead of
``program'', and if ``program'' uses stdio it will buffer as if it were
talking to a tty. This solves the problem at hand.

If you don't have the program's source code, and you're using System V,
you're out of luck.

---Dan



More information about the Comp.unix.programmer mailing list