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

From: M. Warner Losh <imp_at_bsdimp.com>
Date: Mon, 24 Nov 2003 15:33:49 -0700 (MST)
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.

Warner
Received on Mon Nov 24 2003 - 13:34:31 UTC

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