Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Aug 2016 19:17:42 +0300
From:      Andrey Chernov <ache@freebsd.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        John Baldwin <jhb@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r304928 - in head/lib/libc: amd64/sys i386/sys sys
Message-ID:  <ebb9e9a0-b7bf-45f8-b6bb-9233f7041d31@freebsd.org>
In-Reply-To: <20160829153440.GT83214@kib.kiev.ua>
References:  <201608272303.u7RN3N0D078505@repo.freebsd.org> <80ad9e03-74bc-8c99-666f-787772bef2b9@freebsd.org> <20160828015210.GI83214@kib.kiev.ua> <1595604.93PBdSz0kX@ralph.baldwin.cx> <20160829065813.GP83214@kib.kiev.ua> <20160829070715.GQ83214@kib.kiev.ua> <66844e3f-0e62-aaa2-3c27-3d3063a51c8e@freebsd.org> <20160829153440.GT83214@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On 29.08.2016 18:34, Konstantin Belousov wrote:
> On Mon, Aug 29, 2016 at 06:05:50PM +0300, Andrey Chernov wrote:
>> No surprise since they all share the same initial implementation. You
>> can add NetBSD and OpenBSD too. Errno clearing as undocumented side
>> effect is not what we need, and every system documents that user must
>> clear errno.
> Of course they do not share initial implementation. Solaris ptrace(2) is
> the recent clean room implementation of the interface on top of their
> procfs(4).  Glibc provides the code specific to linux, and they only
> clear errno for requests which might return -1 legitimately, and only do
> it after.
> 
> I would understand your argument if I referenced Open/NetBSD, but I did not.
> 

Of course I don't mean that they share the same code, it is impossible.
By sharing I mean they look at the same initial implementation (or its
already existent forks), writing their own code, so this errno clearing
piece becomes common as becomes common that really documented another
way is.

But all this is history. Now we have
a) Undocumented errno clearing (as bare minimum).
b) Inconsistency with other libc functions and syscalls related to
forced errno clearing (in wider scope).




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ebb9e9a0-b7bf-45f8-b6bb-9233f7041d31>