Path: utzoo!attcan!uunet!husc6!uwvax!oddjob!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.bugs.4bsd Subject: Re: linebuffering & input Message-ID: <13779@mimsy.UUCP> Date: 29 Sep 88 16:13:34 GMT References: <486@quintus.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 27 In article <486@quintus.UUCP> ok@quintus (Richard A. O'Keefe) writes: >This problem exists in SunOS 3.2 and DYNIX "V3.0.12 NFS", so I suspect >that it is a 4.2BSD problem. It is; it persists in 4.3BSD and 4.3BSD-tahoe; and there is no really easy fix. You can add your own flush for all line buffered streams: static flushifl(f) FILE *f; { if (f->_flag & _IOLBF) (void) fflush(f); } flushlb() { _fwalk(flushifl); } _fwalk is undocumented, so this should be used only `#if needed' as a workaround. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris