diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2013-11-26 11:32:32 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2013-11-26 11:32:32 +0000 |
commit | cd824103fb1b848460889e9776a04cd3d54b4297 (patch) | |
tree | 7c93a5a33cd3f63728ab79272b5b3a7f6d08dbaf | |
parent | b6ce7dbf3c6f913775c2f544f55d2c9865703b37 (diff) |
deal with msgbuf_write EAGAIN, ok gilles benno
-rw-r--r-- | usr.sbin/dvmrpd/control.c | 4 | ||||
-rw-r--r-- | usr.sbin/dvmrpd/dvmrpd.c | 6 | ||||
-rw-r--r-- | usr.sbin/dvmrpd/dvmrpe.c | 6 | ||||
-rw-r--r-- | usr.sbin/dvmrpd/rde.c | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/usr.sbin/dvmrpd/control.c b/usr.sbin/dvmrpd/control.c index c3cbde4050f..0bfd1e5311b 100644 --- a/usr.sbin/dvmrpd/control.c +++ b/usr.sbin/dvmrpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.17 2013/03/11 17:40:11 deraadt Exp $ */ +/* $OpenBSD: control.c,v 1.18 2013/11/26 11:32:30 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -229,7 +229,7 @@ control_dispatch_imsg(int fd, short event, void *bula) } } if (event & EV_WRITE) { - if (msgbuf_write(&c->iev.ibuf.w) == -1) { + if (msgbuf_write(&c->iev.ibuf.w) == -1 && errno != EAGAIN) { control_close(fd); return; } diff --git a/usr.sbin/dvmrpd/dvmrpd.c b/usr.sbin/dvmrpd/dvmrpd.c index 2fe8bc1b4c8..d1ddf5a7b77 100644 --- a/usr.sbin/dvmrpd/dvmrpd.c +++ b/usr.sbin/dvmrpd/dvmrpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dvmrpd.c,v 1.14 2011/08/20 19:02:28 sthen Exp $ */ +/* $OpenBSD: dvmrpd.c,v 1.15 2013/11/26 11:32:30 henning Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -366,7 +366,7 @@ main_dispatch_dvmrpe(int fd, short event, void *bula) fatalx("pipe closed"); } if (event & EV_WRITE) { - if (msgbuf_write(&ibuf->w) == -1) + if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN) fatal("msgbuf_write"); } @@ -419,7 +419,7 @@ main_dispatch_rde(int fd, short event, void *bula) fatalx("pipe closed"); } if (event & EV_WRITE) { - if (msgbuf_write(&ibuf->w) == -1) + if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN) fatal("msgbuf_write"); } diff --git a/usr.sbin/dvmrpd/dvmrpe.c b/usr.sbin/dvmrpd/dvmrpe.c index a69753c0c08..fd45b7a2cc7 100644 --- a/usr.sbin/dvmrpd/dvmrpe.c +++ b/usr.sbin/dvmrpd/dvmrpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dvmrpe.c,v 1.10 2011/07/04 04:34:14 claudio Exp $ */ +/* $OpenBSD: dvmrpe.c,v 1.11 2013/11/26 11:32:31 henning Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -249,7 +249,7 @@ dvmrpe_dispatch_main(int fd, short event, void *bula) fatalx("pipe closed"); } if (event & EV_WRITE) { - if (msgbuf_write(&ibuf->w) == -1) + if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN) fatal("msgbuf_write"); } @@ -314,7 +314,7 @@ dvmrpe_dispatch_rde(int fd, short event, void *bula) fatalx("pipe closed"); } if (event & EV_WRITE) { - if (msgbuf_write(&ibuf->w) == -1) + if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN) fatal("msgbuf_write"); } diff --git a/usr.sbin/dvmrpd/rde.c b/usr.sbin/dvmrpd/rde.c index 6701cf557f6..5fe56d6e81e 100644 --- a/usr.sbin/dvmrpd/rde.c +++ b/usr.sbin/dvmrpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.22 2009/11/02 20:31:50 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.23 2013/11/26 11:32:31 henning Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org> @@ -209,7 +209,7 @@ rde_dispatch_imsg(int fd, short event, void *bula) fatalx("pipe closed"); } if (event & EV_WRITE) { - if (msgbuf_write(&ibuf->w) == -1) + if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN) fatal("msgbuf_write"); } |