(stat(...) == -1 || faccessat(...) == -1) && errno == EINTR ?!??

Florian Weimer fweimer@redhat.com
Mon Feb 15 09:45:27 GMT 2021


* Tobias Bading:

>> Returning EINTR in stat would allow relatively straightforward
>> implementation of a timeout, in case the path resides on a network file
>> system and the server is unreachable.  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
-- 
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill



More information about the Libc-help mailing list