From 9acc266dadda7962e900ef03adc7a0217e54815f Mon Sep 17 00:00:00 2001 From: benno <> Date: Wed, 13 Nov 2013 21:04:46 +0000 Subject: [PATCH] document that ibuf_write() and msgbuf_write() can now return EAGAIN from and with deraadt@ --- src/lib/libutil/imsg_init.3 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/lib/libutil/imsg_init.3 b/src/lib/libutil/imsg_init.3 index 19320b8e..bac4a09d 100644 --- a/src/lib/libutil/imsg_init.3 +++ b/src/lib/libutil/imsg_init.3 @@ -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 .\" @@ -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