From owner-svn-src-head@freebsd.org Mon Aug 29 17:46:53 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 1607BBC76E2 for ; Mon, 29 Aug 2016 17:46:53 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f51.google.com (mail-lf0-f51.google.com [209.85.215.51]) (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 9A50BCC0 for ; Mon, 29 Aug 2016 17:46:52 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f51.google.com with SMTP id g62so106076533lfe.3 for ; Mon, 29 Aug 2016 10:46:52 -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=C9V1TyfIO1KEUdvO36APoV1JYkKuQmrUNgFevdmCtOs=; b=kx/GTbZzymihsMa9ISfIKFmOOuxHyXPNvg1Gr/vP8SmaTlpMLSfFJuyZh2QtkjDbav O+AwvnFVdPSn0G8hhwv0+oRrFJxmMoLmvSbWrl/mTDdVcvqE/R3ECtjs0D7G8qUvog69 r7YCim1dbv+1Qt/MFV5H9ElnDw7+T+sgGlaozESUZK9LlGQY1r5k4WnewENnJlGa3vxs aIjifTF3sRk2ajpCdacjQBjtphtTXw34vfTJhd8OuPSRYBf1fWTKihSoB40ZXv3wf3NC l5pgsxLB/dD6zH3YbJdVUdagU6ngtxs2UDg++1F/09Y5pE5JLSah6htoiWhCjFsJG5JU nD4w== X-Gm-Message-State: AE9vXwNcES3yeG1qHcOB4IcUdBGvvx7Mkm3IpAs+DP9bOB4KVVNuzOy2HZb7qvbNChV8yQ== X-Received: by 10.46.33.72 with SMTP id h69mr5496936ljh.45.1472492810181; Mon, 29 Aug 2016 10:46:50 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id q36sm6555924lfi.26.2016.08.29.10.46.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Aug 2016 10:46:49 -0700 (PDT) Subject: Re: svn commit: r304928 - in head/lib/libc: amd64/sys i386/sys sys To: John Baldwin , Konstantin Belousov References: <201608272303.u7RN3N0D078505@repo.freebsd.org> <1595604.93PBdSz0kX@ralph.baldwin.cx> <20160829065813.GP83214@kib.kiev.ua> <18206408.GMLM77D01s@ralph.baldwin.cx> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Andrey Chernov Message-ID: Date: Mon, 29 Aug 2016 20:46:47 +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: <18206408.GMLM77D01s@ralph.baldwin.cx> 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 17:46:53 -0000 On 29.08.2016 19:51, John Baldwin wrote: >> int >> ptrace(int request, pid_t pid, caddr_t addr, int data) >> { >> >> errno = 0; >> return (__sys_ptrace(request, pid, addr, data)); >> } > > Certainly I think having a C wrapper like this makes more sense than > doing it all in assembly N times. I would probably prefer to keep the > manpage language the way it is though. Either we implement this wrapper or left all things as is, we need to document internal errno clearing additionally, to not make people wonder why errno becomes 0, probably with the mention that program should not relay on this obsoleted implementation feature. IMHO, it will be better to not clear errno at all, considering 'before call' way documented everywhere and consumers behavior analyzed by kib@