Browse Source

document that ibuf_write() and msgbuf_write() can now return EAGAIN

from and with deraadt@
OPENBSD_5_5
benno 11 years ago
parent
commit
9acc266dad
1 changed files with 9 additions and 3 deletions
  1. +9
    -3
      src/lib/libutil/imsg_init.3

+ 9
- 3
src/lib/libutil/imsg_init.3 View File

@ -1,4 +1,4 @@
.\" $OpenBSD: imsg_init.3,v 1.9 2013/06/05 03:40:26 tedu Exp $
.\" $OpenBSD: imsg_init.3,v 1.10 2013/11/13 21:04:46 benno Exp $
.\"
.\" Copyright (c) 2010 Nicholas Marriott <nicm@openbsd.org>
.\"
@ -14,7 +14,7 @@
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 5 2013 $
.Dd $Mdocdate: November 13 2013 $
.Dt IMSG_INIT 3
.Os
.Sh NAME
@ -395,6 +395,9 @@ using
.Xr writev 2 .
It returns 1 if it succeeds, \-1 on error and 0 when an EOF condition on the
socket is detected.
Temporary resource shortages are returned with errno
.Er EAGAIN
and require the application to retry again in the future.
.Pp
.Fn ibuf_free
frees
@ -423,6 +426,9 @@ to transmit buffers queued in
.Fa msgbuf .
It returns 1 if it succeeds, \-1 on error, and 0 when an EOF condition on the
socket is detected.
Temporary resource shortages are returned with errno
.Er EAGAIN
and require the application to retry again in the future.
.Pp
.Fn msgbuf_drain
discards data from buffers queued in
@ -492,7 +498,7 @@ library is used to monitor the socket file descriptor.
When the socket is ready for writing, queued messages are transmitted with
.Fn msgbuf_write :
.Bd -literal -offset indent
if (msgbuf_write(&ibuf-\*(Gtw) \*(Lt 0) {
if (msgbuf_write(&ibuf-\*(Gtw) \*(Lt 0 && errno != EAGAIN) {
/* handle write failure */
}
.Ed


Loading…
Cancel
Save