Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: comp.lang.c Subject: Re: stdio error detection Message-ID: <9063@utzoo.UUCP> Date: Mon, 7-Dec-87 13:32:30 EST Article-I.D.: utzoo.9063 Posted: Mon Dec 7 13:32:30 1987 Date-Received: Mon, 7-Dec-87 13:32:30 EST References: <289@cresswell.quintus.UUCP>, <13100001@bucc2> Organization: U of Toronto Zoology Lines: 16 > >It would be really nice if the stdio functions were defined to set errno... > > Set errno to what? There is no way the C standards committee is going to > attempt to identify all OS-dependent low-level error causes and provide > standard encodings for all of them! It's not necessary to do that. It suffices to say that the function in question sets errno and that strerror() can be used to turn the value of errno into a human-readable string. This does reduce the usefulness a bit, since your program can't analyze the precise cause and do something intelligent about it, but it's better than nothing. Analysis of precise causes is tricky anyway, since there is some variation in errno codes even between different Unixes. -- Those who do not understand Unix are | Henry Spencer @ U of Toronto Zoology condemned to reinvent it, poorly. | {allegra,ihnp4,decvax,utai}!utzoo!henry