diff options
author | Sebastian Benoit <benno@cvs.openbsd.org> | 2013-11-13 20:44:40 +0000 |
---|---|---|
committer | Sebastian Benoit <benno@cvs.openbsd.org> | 2013-11-13 20:44:40 +0000 |
commit | f30263fcc5def81c861170578c58bc96ac30320b (patch) | |
tree | 9e72404e93da47030f522befe71eefe3655c8c73 /usr.sbin/ntpd/ntpd.c | |
parent | ea792c44642668013aaad483e9a4748337b66c3d (diff) |
from sthen: handle msgbuf_write() returning EAGAIN
ok krw
Diffstat (limited to 'usr.sbin/ntpd/ntpd.c')
-rw-r--r-- | usr.sbin/ntpd/ntpd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ntpd/ntpd.c b/usr.sbin/ntpd/ntpd.c index f2c760502a8..53433c556b4 100644 --- a/usr.sbin/ntpd/ntpd.c +++ b/usr.sbin/ntpd/ntpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntpd.c,v 1.74 2013/10/16 21:23:59 jmc Exp $ */ +/* $OpenBSD: ntpd.c,v 1.75 2013/11/13 20:44:39 benno Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -217,7 +217,7 @@ main(int argc, char *argv[]) } if (nfds > 0 && (pfd[PFD_PIPE].revents & POLLOUT)) - if (msgbuf_write(&ibuf->w) < 0) { + if (msgbuf_write(&ibuf->w) <= 0 && errno != EAGAIN) { log_warn("pipe write error (to child)"); quit = 1; } @@ -597,7 +597,7 @@ ctl_main(int argc, char *argv[]) } while (ibuf_ctl->w.queued) - if (msgbuf_write(&ibuf_ctl->w) < 0) + if (msgbuf_write(&ibuf_ctl->w) <= 0 && errno != EAGAIN) err(1, "ibuf_ctl: msgbuf_write error"); done = 0; |