From owner-svn-src-head@freebsd.org Sun Aug 28 01:04:04 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 D912DA947E5 for ; Sun, 28 Aug 2016 01:04:04 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f48.google.com (mail-lf0-f48.google.com [209.85.215.48]) (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 6A0F0DD9 for ; Sun, 28 Aug 2016 01:04:04 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f48.google.com with SMTP id f93so79459328lfi.2 for ; Sat, 27 Aug 2016 18:04:04 -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=Pbk5kN459UYksGvMzF4TfnsorGdCj2gKqxTqSmCXR0s=; b=DJiNEIdt7SLQG0cA31QH1xSH1Bqzd2Ha4x3BZONgH9vp96oFFt/y7iVevctmqTGxlt wRxG0aS6EDldqv9tnM/eY04apZ2jQEKFGw3yqTLhrgsDcCa/I9HwOw7kGKkvqbSp2eWb 0Zlm9DiRC3tfqQeRFKHzT9PdGPfXFvCfnByaoIBhgqopdZf3n20Gn9Qw9Bv3dubaZcFF QDzk240zgyvegc4F3wGJhus01IKmANETG0UFJguKudbgo8ZRXxH8w46Pd8aL/+/8Agy+ KjamY3rXitzD5poULwbu23/dPydjFz6Fz9CifTjvtsxKCTolou38w4kCugqsve9th/9I 6tSg== X-Gm-Message-State: AE9vXwPIwfWh1K54NV87TVeBIJEgJ1xMqKEahu+4PnC14XZGPDBowLGL0k/N9Man+NBaSw== X-Received: by 10.25.85.198 with SMTP id j189mr3681147lfb.31.1472346242112; Sat, 27 Aug 2016 18:04:02 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id n128sm5262351lfb.45.2016.08.27.18.04.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Aug 2016 18:04:01 -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> <9bcf10db-de3f-33ce-e418-03ce3283ac90@freebsd.org> <20160828005637.GG83214@kib.kiev.ua> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Andrey Chernov Message-ID: <59ac1812-7c77-b677-51c4-dcadc6b2be7f@freebsd.org> Date: Sun, 28 Aug 2016 04:04:00 +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: <20160828005637.GG83214@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: Sun, 28 Aug 2016 01:04:05 -0000 On 28.08.2016 3:56, Konstantin Belousov wrote: > On Sun, Aug 28, 2016 at 03:38:10AM +0300, Andrey Chernov wrote: >> On 28.08.2016 2:03, Konstantin Belousov wrote: >>> Since ptrace(2) syscall can return -1 for non-error situations, libc >>> wrappers set errno to 0 before performing the syscall, as the service >>> to the caller. >> >> Both C99 and POSIX directly prohibits any standard function to set errno >> to 0. ptrace() should either choose other errno to indicate non-error >> situation or change return -1 to something else. >> > ptrace(2) is not a standard function. > And, we cannot break ABI for the syscall. > C99 statement sounds stricter: "The value of errno is zero at program startup, but is never set to zero by any library function. 176)" And syscall is not different from library function from C99 point of view.