From owner-svn-src-all@freebsd.org Mon Aug 29 17:46:58 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 469EDBC7702 for ; Mon, 29 Aug 2016 17:46:58 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f41.google.com (mail-lf0-f41.google.com [209.85.215.41]) (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 E1940CED for ; Mon, 29 Aug 2016 17:46:57 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f41.google.com with SMTP id l89so106231474lfi.1 for ; Mon, 29 Aug 2016 10:46:57 -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=kxVQVcbyWQGXHn4ZQkZSE+IGCKqMlZvoSn0Cfjl9EQ90hEd8scvUmqcuyi/NjR8uJc WPqBfWiUmO3gaUAeRjZYonUQ2p+SOTPJFpUDFciHS6VOZYzKt/UtrXi746c24hnxeYwn XIFxwsfYyuXyvUbrze4A8zneF2yAHykjMgja0DtOpm+EuB6F3JGaWuX5MrBKS+OhVZZ9 mf88cKAu+1p+4dorEy/OLl/mAEB53U5CGXuUL2isPRXTRXnhITaNRHQDMRBwrCFqPjWX +VlyZIKoYuqWCf+Fe+l6HORbI9Xhulc+uR6s9+CaBRiy1MOZ0pGKlTJugXbb9PXLC74c ErWA== X-Gm-Message-State: AE9vXwPaZILEVkeWvI9ucaebRCGLAGiy/RAt/UC/7pNtY8ICCpigGfMxgQsDGFCxs0dwqg== 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-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 17:46:58 -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@