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/control.c | |
parent | ea792c44642668013aaad483e9a4748337b66c3d (diff) |
from sthen: handle msgbuf_write() returning EAGAIN
ok krw
Diffstat (limited to 'usr.sbin/ntpd/control.c')
-rw-r--r-- | usr.sbin/ntpd/control.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ntpd/control.c b/usr.sbin/ntpd/control.c index 121e5a475e4..88dc791377a 100644 --- a/usr.sbin/ntpd/control.c +++ b/usr.sbin/ntpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.1 2013/10/04 14:28:16 phessler Exp $ */ +/* $OpenBSD: control.c,v 1.2 2013/11/13 20:44:39 benno Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -184,7 +184,7 @@ control_dispatch_msg(struct pollfd *pfd, u_int *ctl_cnt) } if (pfd->revents & POLLOUT) - if (msgbuf_write(&c->ibuf.w) < 0) { + if (msgbuf_write(&c->ibuf.w) <= 0 && errno != EAGAIN) { *ctl_cnt -= control_close(pfd->fd); return (1); } |