From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.web.de (mout.web.de [212.227.17.11]) by sourceware.org (Postfix) with ESMTPS id CA6F13851C16 for ; Mon, 15 Feb 2021 10:02:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CA6F13851C16 X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from [192.168.2.103] ([84.143.151.159]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MjBVv-1lqiM81PgD-00fF1F; Mon, 15 Feb 2021 11:02:17 +0100 Subject: Re: (stat(...) == -1 || faccessat(...) == -1) && errno == EINTR ?!?? To: Florian Weimer Cc: libc-help@sourceware.org, Godmar Back References: <000830b6-1cf0-6349-5667-a5af6894ac1b@web.de> <87czx1fzun.fsf@oldenburg.str.redhat.com> <8a591e0e-33bb-7518-5e31-42f0545a940e@web.de> <878s7pfyvc.fsf@oldenburg.str.redhat.com> From: Tobias Bading Message-ID: Date: Mon, 15 Feb 2021 11:02:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <878s7pfyvc.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Provags-ID: V03:K1:HVg7s43B+oJhLrr6vBR8TqyZJgVX5PMRy3oCkBt7/vN8ZW84qkE HS3WAS0y8H5yoVHW2OUypuywCBTqnoyJkNCrQRfL2G+YOe1LI0+1A1s9FFf5dDhOM4y8dm3 vwCCHaTA0jGRu3dvT3yQz799z9oxu7xPvlWKEFopyp0VNDpYg7DuZt1LMdJr+bjekXH/eWK 1n+o8SC7GyV7w95Ti+1FA== X-UI-Out-Filterresults: notjunk:1;V03:K0:DvxDT1MlJx8=:d+0W+M5untxFYKmUZuj7Z/ dqFP3MG27w4+PYntieZmAsD7YlNNcGB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SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 10:02:23 -0000 > Yes, this is not a POSIX conformance issue. o.O I don't get it. How is a developer supposed to decide in which cases EINTR handling is required? Check the man page on every platform the code is supposed to work on and hope that at least one platform mentions EINTR if the function is indeed able to fail that way? Tobias =2D-- On 15.02.21 10:45, Florian Weimer wrote: > * Tobias Bading: > >>> Returning EINTR in stat would allow relatively straightforward >>> implementation of a timeout, in case the path resides on a network fil= e >>> system and the server is unreachable.=C2=A0 So it's not a completely >>> unreasonable thing to do. >> Good point. >> >>> On the other hand, the cost in lost backwards >>> compatibility with applications that do not know about this behavior >>> appears to be pretty high, as this thread shows. >> What's your interpretation of the POSIX standard? Does it permit such a >> backwards compatibility breaking change? > Yes, this is not a POSIX conformance issue. POSIX also does not make > any requirements regarding backwards compatibility or bug-for-bug > compatibility. > > Thanks, > Florian