Latest changes from upstream with commit message...
authorSunil Nimmagadda <sunil@nimmagadda.net>
Sat, 23 Aug 2014 09:19:50 +0500
changeset 28 0f57e2995a16
parent 27 6a8a845df07c
child 29 9ced98f59ea6
Latest changes from upstream with commit message... When the three possible return values are -1, 0, and 1, != 1 is the same as <= 0. And the latter is the normal idiom so use that. ok claudio@ henning@
imsgev.c
--- a/imsgev.c	Wed Aug 20 21:46:02 2014 +0500
+++ b/imsgev.c	Sat Aug 23 09:19:50 2014 +0500
@@ -138,7 +138,7 @@
 		 * closed, or some error occured. Both case are not recoverable
 		 * from the imsg perspective, so we treat it as a WRITE error.
 		 */
-		if ((n = msgbuf_write(&ibuf->w)) != 1) {
+		if ((n = msgbuf_write(&ibuf->w)) <= 0 && errno != EAGAIN) {
 			imsgev_disconnect(iev, IMSGEV_EWRITE);
 			return;
 		}