From owner-svn-src-all@freebsd.org Mon Aug 29 16:17:54 2016 Return-Path: Delivered-To: svn-src-all@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 80FBEBC7A8E for ; Mon, 29 Aug 2016 16:17:54 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) (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 D4A51FEC for ; Mon, 29 Aug 2016 16:17:53 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f43.google.com with SMTP id g62so104371353lfe.3 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=GGE5rHm2rx1zQ4CdmsXdXTZFGsqvnNepmFn7e96P7Bn6MKAJ3LK5bSxy/qHP8eq+Ko REC+RT1exrQNOQzs4Eg12xRk/z0ShCaTKg7d5aMFxADQfp/vvXuumzwUWXCAjnlKHaE7 cqYMgt8ezYIbgeIwp0etPYXR4FZN+CGunnDbjRQJtWc2PYn15Hryzpl0BM5Df2yQrwDO ifxTS3FCzUvnd+986b9UQ9CABjVs8IRbm1E9cP5Q/sQDoxi31umz18u+7Lcv1megSUQw 9f0T+VNPIq7NrZAnY2tsBNjOCRPt3LBcGkDpFkAzlShZMEd388GHE6PoUlwtu6aCwblN SDbQ== X-Gm-Message-State: AE9vXwO/diqE7bOe5bEOTy0SIbuTvA2CD6I0MyBRmVEpOsM1I56zlWGWilzQZ85nw6+k4Q== 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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).