Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn ) Newsgroups: net.unix-wizards Subject: Re: Printf sets errno to 25? Message-ID: <716@brl-tgr.ARPA> Date: Sun, 15-Dec-85 20:28:00 EST Article-I.D.: brl-tgr.716 Posted: Sun Dec 15 20:28:00 1985 Date-Received: Tue, 17-Dec-85 07:27:04 EST References: <119@cpsc6a.UUCP> Distribution: net Organization: Ballistic Research Lab Lines: 9 isatty() is not the only culprit; other "section 3" C library routines also can set errno as a side-effect of successful operation. (This can legitimately be considered a misfeature, but that's the way it is.) You should only test errno when a system call (section 2 routine) returns an error indication. Nothing in the C library should ever set errno to 0, although if the misfeature were to be corrected some routines would have to save and restore errno.