NetBSD-Docs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: socket(7) and section 2



Christos Zoulas wrote:
> >Throughout the socket documentation, ERRORS is not exhaustive. 
> >write(2) for instance doesn't mention that EPIPE is set (or at least
> >*should* be, after SIGPIPE) after writing to a closed connection.  Nor
> >is ENETDOWN mentioned.  I could go on.  
> 
> You can start with the opengroup case, but they don't mention the
> network related errors either. Perhaps mention that if the file
> descriptor refers to a socket, then all the errors from send can be
> returned.

Opengroup got that far: 

http://www.opengroup.org/onlinepubs/000095399/functions/write.html

        "If fildes refers to a socket, write() shall be equivalent to send() 
with
no flags set."

I take it, though, that you mean our implementation asserts conformance
with SuSv3?  It's easy to document what these things are supposed to do;
it's hard to know exactly what's true about them.  

http://www.opengroup.org/comm/press/15feb06.htm  

I missed that announcement at the time.  IIUC, we can use opengroup's docs
verbatim?  That would be nice, particularly if they're in a format that is
or can be converted to mdoc.  Where are they?  

I'm confused about SuSv3, though.  Austin says it was approved in December
and is published by TOG.  I registered, yet everything I see at 
http://www.unix.org/single_unix_specification/ says "The Open Group Base
Specifications Issue 6 IEEE Std 1003.1, 2004 Edition".  Not 2008.  

Perhaps we should adopt the opengroup socket API docs wholesale and edit
them for any specifics we already mention.  Then we can add to the BUGS
section whenever practice deviates from theory until a kernel hacker
narrows the difference.  

--jkl


Home | Main Index | Thread Index | Old Index