Xref: utzoo comp.unix.programmer:1172 comp.unix.wizards:24272 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!mcsun!hp4nl!let.rug.nl!bert From: bert@let.rug.nl (Bert Bos) Newsgroups: comp.unix.programmer,comp.unix.wizards Subject: How do I keep a pipe from buffering I/O? Keywords: pipe() exec() Message-ID: <1585@gufalet.let.rug.nl> Date: 26 Feb 91 21:01:32 GMT Followup-To: comp.unix.programmer Organization: Faculty of Arts, Groningen University, The Netherlands Lines: 18 I tried to fork a process and redirect both input and output to pipes. Both processes could work in parallel and as soon as one of the two had some text ready, it would be written out on the pipe for the other process to read. One of the processes could even be a program such as Awk (started with exec()). Problem is, the pipes appear to buffer such large amounts of text, that one process only gets input after the other has already finished. How do I force the pipes to pass on text one line at a time? I'm using calls such as pipe(), dup2(), select(), read(), etc, but I couldn't find anything in the manuals. -- "Always remember, however, that there's Bert Bos (bert@let.rug.nl) usually a simpler and better way to do Alfa-informatica something than the first way that pops RijksUniversiteit Groningen into your head." (D.E. Knuth, TeXbook) Groningen, The Netherlands Brought to you by Super Global Mega Corp .com