(stdio) What should pay attention to the error indicator?

Roland McGrath rk9005 at cca.ucsf.edu
Thu Mar 17 12:37:57 AEST 1988


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 at rtsg.lbl.gov roland at lbl-rtsg.arpa
UUCP: ...!ucbvax!lbl-rtsg.arpa!roland



More information about the Comp.unix.wizards mailing list