Commit Graph

84 Commits

Author SHA1 Message Date
Michael Kerrisk 86426e0be4 accept.2, read.2, recv.2, send.2, write.2: Fix discussion of EAGAIN/EWOULDBLOCK errors
For a non-blocking socket, POSIX.1-2001/2008 allow either
EAGAIN or EWOULDBLOCK to be returned in cases where a call
would have blocked.  Although these constants are defined
with the same value on most Linux architectures (PA-RISC
is the exception), POSIX.1 does not require them to have
the same value.  Therefore, a portable application using
the sockets API should test for both errors when checking
this case.

(NB POSIX.1 only mentions EWOULDBLOCK in the context of
the sockets interfaces.)

Change made after a note cross-posted on linux-arch@vger,
http://thread.gmane.org/gmane.linux.debian.ports.hppa/5615
and a suggestion for write(2) from Carlos O'Donell

Reported-by: Carlos O'Donell <carlos@systemhalted.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-02-23 20:31:52 +13:00
Michael Kerrisk 689cdcf175 accept.2: srcfix: Remove outdated FIXME 2009-01-16 07:14:57 +13:00
Michael Kerrisk fecaa19a28 accept.2: Reorder ERRORS list
Some errors were listed under a separate "may" heading.
There's probably no real need to do this; integrate
those errors into the main list.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:47:17 -05:00
Michael Kerrisk 6f74cfbb4b accept.2: Document accept4() system call, new in Linux 2.6.28 2008-12-05 22:47:17 -05:00
Michael Kerrisk b98353f035 accept.2: Clarify details when returned address is truncated
If the returned address is truncated, the 'addrlen' argument
indicates the actual size of the address, rather than a count
of the number of bytes in the truncated buffer.

Also clarify that if 'addr' argument is NULL, then 'addrlen'
should is unused, and should also be NULL.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:28:57 -05:00
Michael Kerrisk 5dfedcae40 accept.2, listen.2, recv.2, getpeername.2, getsockname.2, shutdown.2, socketpair.2: Global fix: SEE ALSO: add socket(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:18:09 -05:00
Michael Kerrisk 01538d0d51 ERRORS: Added reference to signal(7) in dicussion of EINTR. 2008-07-04 15:50:36 +00:00
Michael Kerrisk 00b7d497e3 small wording fix 2008-07-04 15:23:23 +00:00
Michael Kerrisk 0daa9e92d0 Fix redundant formatting macros 2007-09-20 16:26:31 +00:00
Michael Kerrisk c11b1abf2e Change mtk's email address 2007-09-20 06:52:22 +00:00
Michael Kerrisk 682edefb1b ffix 2007-06-22 17:16:20 +00:00
Michael Kerrisk 2b0fa18232 replace form `....' with \fI...\fP where the enclosed string is a pathname,
type name, or argument name.
2007-06-12 21:19:16 +00:00
Michael Kerrisk 53a6b01dee Add NOTES paragraph noting that <sys/types.h> isn't required by
POSIX.1-2001 or Linux, but was required on some implementations.
2007-06-10 18:08:27 +00:00
Michael Kerrisk d9bfdb9c21 Convert to American spelling conventions 2007-06-08 09:56:56 +00:00
Michael Kerrisk d9343c5c13 Removed version number from .TH line 2007-05-30 05:36:26 +00:00
Michael Kerrisk f11e5e44f7 Add new EXAMPLE section with pointer to example in bind.2. 2007-05-28 10:40:39 +00:00
Michael Kerrisk a1d5f77cc8 Reordered sections to be more consistent, in some cases renaming
sections or shifting paragraphs between sections.
2007-05-18 16:06:42 +00:00
Michael Kerrisk 19c98696a2 s/SH NOTE$/SH NOTES/ 2007-05-16 02:54:18 +00:00
Michael Kerrisk 8c87824d61 Made .SH into .SS 2007-05-16 02:45:55 +00:00
Michael Kerrisk c13182efa3 Wrapped long lines, wrapped at sentence boundaries; stripped trailing
white space.
2007-04-12 22:42:49 +00:00
Michael Kerrisk cf0a9ace57 ffix 2007-04-05 12:36:57 +00:00
Michael Kerrisk 75b48e9d74 Various fixes to CONFORMING TO 2006-12-17 01:34:44 +00:00
Michael Kerrisk 9d9dc1e854 Updated CONFORMING TO and/or standards references 2006-08-04 09:41:28 +00:00
Michael Kerrisk 97c1eac86f Updated CONFORMING TO section 2006-08-03 13:57:17 +00:00
Michael Kerrisk c51fc3c114 tfix 2006-05-02 20:03:41 +00:00
Michael Kerrisk 601dff4a19 Remove mention of SOCK_RDM from this page, since this socket
type does not support accept()ing connections.
2006-04-18 07:39:12 +00:00
Michael Kerrisk 16c892d319 Documented EINVAL error for 'len' < 0. 2006-03-31 22:12:10 +00:00
Michael Kerrisk cd31a0d631 spfix 2006-03-20 00:52:31 +00:00
Michael Kerrisk f87925c6bf Formatting fixes 2005-10-19 16:30:05 +00:00
Michael Kerrisk b14d4aa5b8 Classical BSD versions are now always named x.yBSD (formerly
there was a mix of x.yBSD and BSD x.y).
2005-07-18 15:05:56 +00:00
Michael Kerrisk ae1a9ff438 Various wording and formatting fixes. 2005-06-30 10:16:11 +00:00
Michael Kerrisk cca657e227 triggered by http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=283179
The wording describing how errno is set was tidied up in a number of
pages.
2004-12-20 12:24:06 +00:00
Michael Kerrisk 305a0578bf Global change of email address for MTK (now: mtk-manpages@gmx.net) 2004-11-03 14:43:40 +00:00
Michael Kerrisk fea681dafb Import of man-pages 1.70 2004-11-03 13:51:07 +00:00