Nov. 14, 2024
5:19 p.m.
On 11/14/24 00:53, Robert Elz wrote:
Since that number is what it is specified to produce, it isn't successful unless it does.
Not quite following what you mean here. Here's a different example to illustrate the point. If an application calls open(".", -1) where the "-1" contains bits that aren't valid for oflag, EINVAL is a "may fail" error so POSIX does not require 'open' to fail with EINVAL. An implementation is allowed to use the oflag bits it understands while ignoring the flags it doesn't. In other words, for a "may fail" error, the implementation is allowed to not fail, and to support an extension instead. Different people may disagree on what extensions are reasonable; POSIX itself doesn't take a position on that.