Re: [PATCH] libc_r bug: successful close(2) sets errno to ENOTTY

From: Stefan Farfeleder <stefan_at_fafoe.narf.at>
Date: Tue, 25 Nov 2003 00:00:06 +0100
On Mon, Nov 24, 2003 at 03:33:49PM -0700, M. Warner Losh wrote:
> In message: <20031124182322.GB621_at_wombat.fafoe.narf.at>
>             Stefan Farfeleder <stefan_at_fafoe.narf.at> writes:
> : On Mon, Nov 24, 2003 at 07:05:02PM +0100, boyd, rounin wrote:
> : > From: "Jacques A. Vidrine" <nectar_at_FreeBSD.org>
> : > > The application is broken.  You must only check errno if you get an
> : > > error indication from the library call.
> : > 
> : > errno is only meaningful after a syscall error.
> : 
> : Wrong, counter-example: strtol().
> 
> errno is meaningful for syscalls after an error (the original
> message).  The fact that other functions also dink with errno is not
> relevant to that statement.

I read boyd's statement as a contradiction to Jacques' one (only after
syscall error vs. after library call error).  If that's a
misinterpretation, I'm sorry.

Stefan
Received on Mon Nov 24 2003 - 14:00:12 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:30 UTC