Starting with POSIX.1-2017, EOPNOTSUPP is specified as the error when the path argument names a socket, whereas Linux uses this for indicating a filesystem containing pathname does not support O_TMPFILE and uses ENXIO to indicate a socket. For reference, SUSv4, 2018 Edition (POSIX.1-2017): https://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html SUSv2 does not yet contain an error for when the file is socket, nor does it use a different meaning for EOPNOTSUPP: https://pubs.opengroup.org/onlinepubs/7908799/xsh/open.html The same is the case for SUSv3, 2004 Edition, (“POSIX.1-2004”): https://pubs.opengroup.org/onlinepubs/009695399/functions/open.html The same is the case for SUSv4, 2008 Edition, (POSIX.1-2008): https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/functions/open.html Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217821 Signed-off-by: Christoph Anton Mitterer <mail@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> --- man2/open.2 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/man2/open.2 b/man2/open.2 index 4c921723c..2975db017 100644 --- a/man2/open.2 +++ b/man2/open.2 @@ -1218,12 +1218,14 @@ The file is a device special file and no corresponding device exists. .TP .B ENXIO The file is a UNIX domain socket. +See STANDARDS for differences with POSIX. .TP .B EOPNOTSUPP The filesystem containing .I pathname does not support .BR O_TMPFILE . +See STANDARDS for differences with POSIX. .TP .B EOVERFLOW .I pathname @@ -1437,6 +1439,12 @@ with a value greater than or equal to 200809L or with a value greater than or equal to 700. In glibc 2.11 and earlier, one obtains the definitions by defining .BR _GNU_SOURCE . +.PP +POSIX.1-2017 uses +.B EOPNOTSUPP +instead of +.B ENXIO +to indicate that the file is a UNIX domain socket. .SH HISTORY .TP .BR open () -- 2.40.1