From owner-svn-src-head@freebsd.org Mon Aug 29 16:17:54 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46FA9BC7A8C for ; Mon, 29 Aug 2016 16:17:54 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DA256FEE for ; Mon, 29 Aug 2016 16:17:53 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f50.google.com with SMTP id l89so104529181lfi.1 for ; Mon, 29 Aug 2016 09:17:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=EiJdnyECNd6zapkJj0QpSRuvqAOEI8WHbKAFipktFVg=; b=kuZ8bhpdtNjB5TqBAuvovsF2JywlzDFL4X4n8YhduaJ9bpOUNUghnAYWmXyx9kN5+u qdxw2HkgeHPW5TSjPG0UBZgYqMW8TrAQuAI7Gm6AayFoluzkg55ToAwL1jnH8gnIjgVj JrxJ531rnoXdwTeJ04jpaYY6yjEqoVEWCl/CkPAugK6MB8uxTPlAK2jqbETsvfFwXY6s VnTT95L0n4AhoXLPwrq6wJI3H2VvCllFXsyLuAdvmznHYpv2RficGXFc2+v95FFHXxTZ 7ipvuiigvBQLYDNlkKxA/D4fBzQMcCDpnN9nY7L/q0ya00X7BNvx2n6U9KuEn3kh4IwE be1Q== X-Gm-Message-State: AE9vXwPT1cZ0vIl8CA8v81zOa5ADx8YQ0nLeQmZOjjOLTpmp/5+681q4s1fivqIjWqQk4Q== X-Received: by 10.25.76.137 with SMTP id z131mr4687051lfa.49.1472487465545; Mon, 29 Aug 2016 09:17:45 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id g3sm6578297lfe.14.2016.08.29.09.17.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Aug 2016 09:17:45 -0700 (PDT) Subject: Re: svn commit: r304928 - in head/lib/libc: amd64/sys i386/sys sys To: Konstantin Belousov 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> Cc: John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Andrey Chernov Message-ID: Date: Mon, 29 Aug 2016 19:17:42 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160829153440.GT83214@kib.kiev.ua> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2016 16:17:54 -0000 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).