open.2: Document ENXIO for sockets

Linux returns ENXIO when attempting to open() a UNIX domain socket.
Kernel-wise, I believe this happens in fs/inode.c [1], where a constant
`no_open` function returning -ENXIO is registered as the default open()
handler for inodes in inode_init_always(), and is not specialized in
nit_special_inode() as it is for other types.

Seen in the systemd v238 source code [2].

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/inode.c?h=v4.16
[2]: https://github.com/systemd/systemd/blob/v238/src/core/execute.c#L412

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Lucas Werkmeister 2018-05-13 15:21:40 +02:00 committed by Michael Kerrisk
parent 946bdf7207
commit 71b12d0a57
1 changed files with 3 additions and 0 deletions

View File

@ -1126,6 +1126,9 @@ no process has the FIFO open for reading.
.B ENXIO
The file is a device special file and no corresponding device exists.
.TP
.B ENXIO
The file is a socket.
.TP
.BR EOPNOTSUPP
The filesystem containing
.I pathname