Path: utzoo!attcan!uunet!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.sources.d Subject: Re: Inapproprtiae ioctl for user (Re: Comments on INSERT.c) Message-ID: <2741@ficc.uu.net> Date: 15 Jan 89 04:55:35 GMT References: <308@twwells.uucp> <846@auspex.UUCP> Organization: Xenix Support Lines: 23 I said: > >It's not closely related, then, but it's the same basic problem... using > >perror or errno where it's not meaningful. In article <846@auspex.UUCP>, guy@auspex.UUCP (Guy Harris) writes: > No, not really; the problem with "fprintf" followed by "perror" is that > "errno" *is* meaningful before the "fprintf" but "fprintf" might destroy > it, and the problem in "sendmail" is that it isn't meaningful at all. The only place errno is meaningful is immediately after a system call that has returned an error indication. After the fprintf it is no longer meaningful. You're just being a mite too literal-minded here. The exact code to fix the problem is different, but the place to look is the same. It's like, if your leg hurts, you want to start looking at the leg. The actual remedy is different if it's caused by an insect bite or a cut, but it's still the leg that's the problem. -- Peter da Silva, Xenix Support, Ferranti International Controls Corporation. Work: uunet.uu.net!ficc!peter, peter@ficc.uu.net, +1 713 274 5180. `-_-' Home: bigtex!texbell!sugar!peter, peter@sugar.uu.net. 'U` Opinions may not represent the policies of FICC or the Xenix Support group.