[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]
Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page
Top Document: Unix - Frequently Asked Questions (3/7) [Frequent posting]
Previous Document: How do I get rid of zombie processes that persevere?
Next Document: How do I get the date into a filename?
-
Search the FAQ Archives
Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page
Top Document: Unix - Frequently Asked Questions (3/7) [Frequent posting]
Previous Document: How do I get rid of zombie processes that persevere?
Next Document: How do I get the date into a filename?
How do I get lines from a pipe ... instead of only in larger blocks?
Date: Sun, 16 Feb 92 20:59:28 -0500
3.14) How do I get lines from a pipe as they are written instead of only in
larger blocks?
The stdio library does buffering differently depending on whether
it thinks it's running on a tty. If it thinks it's on a tty, it
does buffering on a per-line basis; if not, it uses a larger
buffer than one line.
If you have the source code to the client whose buffering you
want to disable, you can use setbuf() or setvbuf() to change the
buffering.
If not, the best you can do is try to convince the program that
it's running on a tty by running it under a pty, e.g. by using
the "pty" program mentioned in question 3.9.
Top Document: Unix - Frequently Asked Questions (3/7) [Frequent posting]
Previous Document: How do I get rid of zombie processes that persevere?
Next Document: How do I get the date into a filename?
Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page
[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]
Send corrections/additions to the FAQ Maintainer:
tmatimar@isgtec.com (Ted Timar)
Last Update November 22 2008 @ 00:12 AM