Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site pur-phy.UUCP Path: utzoo!linus!decvax!genrad!grkermit!masscomp!clyde!ihnp4!inuxc!pur-ee!CS-Mordred!Pucc-H:Physics:suitti From: suitti@pur-phy.UUCP (Stephen K. Uitti) Newsgroups: net.unix,net.unix-wizards Subject: Re: Pipe buffering query Message-ID: <1118@pur-phy.UUCP> Date: Wed, 30-Nov-83 14:16:35 EST Article-I.D.: pur-phy.1118 Posted: Wed Nov 30 14:16:35 1983 Date-Received: Fri, 2-Dec-83 07:17:55 EST References: <254@bnl.UUCP> Organization: Purdue University Physics Dept. Lines: 17 Given I set up the pipe with "a | b" is there any way for the standard output of "a" to become immediately available on the standard input of "b"? Rather than unbuffer the stdio, as was suggested, use fflush() on the pipe when done with a line or message. If only one character is to be processed at a time, maybe unbuffered I/O is what is needed. You will find that unbuffered I/O is SLOW. You do a painful system call for each character. The UN*X kernel really would rather that you send a buch of characters at a time. "fflush" flushes the buffer & waits until the data is written. It should be documented in chapter 3 of the manuals, which we call "c-callable subroutines". Stephen Uitti (Purdue physics site manager) UUCP: pur-ee!Physics:suitti, purdue!Physics:suitti INTERNET: suitti @ pur-phy.UUCP