Path: utzoo!mnetor!uunet!husc6!hao!ames!pasteur!ucbvax!ucsfcgl!cca.ucsf.edu!rk9005 From: rk9005@cca.ucsf.edu (Roland McGrath) Newsgroups: comp.unix.wizards Subject: (stdio) What should pay attention to the error indicator? Message-ID: <1194@ucsfcca.ucsf.edu> Date: 17 Mar 88 02:37:57 GMT Reply-To: roland@rtsg.lbl.gov (Roland McGrath) Organization: Hackers Anonymous International, Ltd., Inc. (Applications welcome) Lines: 18 Can any of you Unix wizards out there tell me what the various stdio functions and macros should do when trying to talk to a stream whose error indicator (as returned by ferror()) is set? For example, if a stream's error indicator is set because of a previous write error, should subsequent read and write attempts fail until the indicator is cleared? What should clear the error indicator other than clearerr()? I would like both explanations of what various Unices do, what you all think *should* be done and definitely what the ANSI C standard has to say about it (I have been unable to find anything in the January draft about it except that a write error should set the error indicator). -- Roland McGrath ARPA: roland@rtsg.lbl.gov roland@lbl-rtsg.arpa UUCP: ...!ucbvax!lbl-rtsg.arpa!roland