linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] open.2: Clarify different POSIX uses of EOPNOTSUPP and ENXIO
@ 2023-08-25 20:28 Christoph Anton Mitterer
  2023-08-27 19:41 ` Florian Weimer
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Anton Mitterer @ 2023-08-25 20:28 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man

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@christoph.anton.mitterer.name>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-28 14:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-25 20:28 [PATCH] open.2: Clarify different POSIX uses of EOPNOTSUPP and ENXIO Christoph Anton Mitterer
2023-08-27 19:41 ` Florian Weimer
2023-08-27 22:52   ` Christoph Anton Mitterer
2023-08-28 14:20   ` Matthew House

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).