@kusma What's your source for POSIX not guaranteeing to ignore unknown mode flags? [1] says that "Additional values for the mode argument may be supported by an implementation", which in turn would mean that an implementation should ignore flags it does not support, or?

[1] http://pubs.opengroup.org/onlinepubs/009695399/functions/fdopen.html