Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Nov 2003 16:46:24 +0200
From:      Enache Adrian <enache@rdslink.ro>
To:        "Jacques A. Vidrine" <nectar@freebsd.org>
Cc:        current@freebsd.org
Subject:   Re: [PATCH] libc_r bug: successful close(2) sets errno to ENOTTY
Message-ID:  <20031125144624.GA1088@ratsnest.hole>
In-Reply-To: <20031124174457.GB27782@madman.celabo.org>
References:  <20031123141408.GA1426@ratsnest.hole> <20031124174457.GB27782@madman.celabo.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 24, 2003 a.d., Jacques A. Vidrine wrote:
> The application is broken.  You must only check errno if you get an
> error indication from the library call.

Sorry, but I don't see your point. I know when to check for errno.
If you took the little illustrating program for a real life example of
the use of errno, that's unfortunate :-)

The problem is that the emulated/wrapped close from libc_r does not
behave like the real one. libc_r is leaking some of its guts
(the tricks it's doing with O_NONBLOCK, etc) in the interface.
This is technically a bug. The fix was trivial.

Regards,
Adi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031125144624.GA1088>