summaryrefslogtreecommitdiff
path: root/usr.sbin/ntpd/buffer.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2005-08-11 16:21:53 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2005-08-11 16:21:53 +0000
commit41a39b932c3249d3316368a90b3f47e3a8206540 (patch)
treebff8339b596c5ec9f5d800b34c37def43d6c5c85 /usr.sbin/ntpd/buffer.c
parent8429ced8648d4928bd64aefd9a0662a769ebeb76 (diff)
check for EINTR too after writev(), pt out by Alexander Farber
Diffstat (limited to 'usr.sbin/ntpd/buffer.c')
-rw-r--r--usr.sbin/ntpd/buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ntpd/buffer.c b/usr.sbin/ntpd/buffer.c
index de63071714c..173bad3b325 100644
--- a/usr.sbin/ntpd/buffer.c
+++ b/usr.sbin/ntpd/buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: buffer.c,v 1.7 2005/04/26 15:18:22 henning Exp $ */
+/* $OpenBSD: buffer.c,v 1.8 2005/08/11 16:21:52 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -107,7 +107,7 @@ msgbuf_write(struct msgbuf *msgbuf)
}
if ((n = writev(msgbuf->fd, iov, i)) == -1) {
- if (errno == EAGAIN) /* cannot write immediately */
+ if (errno == EAGAIN || errno == EINTR) /* try again later */
return (0);
else
return (-1);