Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/sys Document when recv(2) returns 0
details: https://anonhg.NetBSD.org/src/rev/1662225395dc
branches: trunk
changeset: 773403:1662225395dc
user: manu <manu%NetBSD.org@localhost>
date: Wed Feb 01 13:29:15 2012 +0000
description:
Document when recv(2) returns 0
diffstat:
lib/libc/sys/recv.2 | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r d2e1e863cc0c -r 1662225395dc lib/libc/sys/recv.2
--- a/lib/libc/sys/recv.2 Wed Feb 01 13:01:29 2012 +0000
+++ b/lib/libc/sys/recv.2 Wed Feb 01 13:29:15 2012 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: recv.2,v 1.29 2011/06/27 08:21:08 wiz Exp $
+.\" $NetBSD: recv.2,v 1.30 2012/02/01 13:29:15 manu Exp $
.\"
.\" Copyright (c) 1983, 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -95,6 +95,8 @@
.Va errno
set to
.Er EAGAIN .
+If no data is available and the remote peer was shut down,
+0 is returned.
The receive calls normally return any data available,
up to the requested amount,
rather than waiting for receipt of the full amount requested;
@@ -230,7 +232,9 @@
is returned to indicate that expedited or out-of-band data were received.
.Sh RETURN VALUES
These calls return the number of bytes received, or \-1
-if an error occurred.
+if an error occurred.
+For connected sockets whose remote peer was shut down,
+0 is returned when no more data is available.
.Sh ERRORS
The calls fail if:
.Bl -tag -width Er
Home |
Main Index |
Thread Index |
Old Index