Bug 217821 - document that Linux' open(2) uses ENXIO in case of sockets, while POSIX mandates EOPNOTSUPP
Summary: document that Linux' open(2) uses ENXIO in case of sockets, while POSIX manda...
Status: NEW
Alias: None
Product: Documentation
Classification: Unclassified
Component: man-pages (show other bugs)
Hardware: All Linux
: P3 enhancement
Assignee: documentation_man-pages@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-25 01:07 UTC by Christoph Anton Mitterer
Modified: 2023-08-25 20:30 UTC (History)
0 users

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Christoph Anton Mitterer 2023-08-25 01:07:08 UTC
Hey.

It seems that under Linux, when using a socket file with the open(2) family of functions, the error is:
> ENXIO  The file is a UNIX domain socket.

OTOH, POSIX specifies[0]:
> [EOPNOTSUPP]
>    The path argument names a socket.


Maybe it makes sense to document that? Possibly right at the ENXIO descripton and even additionally in the STANDARDS section?

I could write a patch if you tell me which you like.

Cheers,
Chris.


[0] https://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html
Comment 1 Alejandro Colomar 2023-08-25 10:19:12 UTC
Hi Chris,

On 2023-08-25 03:07, bugzilla-daemon@kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=217821
> 
>             Bug ID: 217821
>            Summary: document that Linux' open(2) uses ENXIO in case of
>                     sockets, while POSIX mandates EOPNOTSUPP
>            Product: Documentation
>            Version: unspecified
>           Hardware: All
>                 OS: Linux
>             Status: NEW
>           Severity: enhancement
>           Priority: P3
>          Component: man-pages
>           Assignee: documentation_man-pages@kernel-bugs.osdl.org
>           Reporter: calestyo@scientia.org
>         Regression: No
> 
> Hey.
> 
> It seems that under Linux, when using a socket file with the open(2) family
> of
> functions, the error is:
>> ENXIO  The file is a UNIX domain socket.
> 
> OTOH, POSIX specifies[0]:
>> [EOPNOTSUPP]
>>    The path argument names a socket.
> 
> 
> Maybe it makes sense to document that? Possibly right at the ENXIO descripton
> and even additionally in the STANDARDS section?
> 
> I could write a patch if you tell me which you like.

Sure.  Please check the ./CONTRIBUTING file in the repository.

Cheers,
Alex

Note You need to log in before you can comment on or make changes to this bug.