Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!nrl-cmf!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.unix.wizards Subject: Re: Stdio buffering question Message-ID: <8063@brl-smoke.ARPA> Date: 10 Jun 88 00:02:05 GMT References: <16124@brl-adm.ARPA> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 9 In article <16124@brl-adm.ARPA> ultra!wayne@ames.arc.nasa.gov (Wayne Hathaway) writes: >I mean, if it doesn't buffer when writing to the terminal, why does >it buffer when writing to a pipe? People keep dorking around with stdio buffering in an attempt to be "helpful". As usual, it just messes things up in some cases. stderr is supposed to start out unbuffered, ALWAYS. It doesn't, though, on SunOS. A way to fix this is to setbuf(stderr,(char*)0); at the beginning of your program.