Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!oddjob!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: Perror complication Message-ID: <8048@mimsy.UUCP> Date: Thu, 20-Aug-87 21:53:07 EDT Article-I.D.: mimsy.8048 Posted: Thu Aug 20 21:53:07 1987 Date-Received: Sat, 22-Aug-87 14:29:47 EDT References: <8913@brl-adm.ARPA> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 18 In article <8913@brl-adm.ARPA> hoey@nrl-aic.arpa (Dan Hoey) writes: >you had better save and restore errno around the call to fprintf, >in case fprintf makes a failing syscall. This is something I had thought about; since my error() takes errno as a parameter, it does not have this problem. On the other hand, the only time fprintf(stderr, ...) currently fails is when stderr is not connected anywhere, in which case none of the perror() text will go anywhere. >Maybe that's why sendmail sometimes says ``Not a typewriter''? No, this is (almost?) always a result of the isatty() calls in _flsbuf(), followed by a syslog() with no intervening section 2 call errors. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690) Domain: chris@mimsy.umd.edu Path: seismo!mimsy!chris