From 3b0d5b83e8451924bf91e7e3e6cc88db877978a7 Mon Sep 17 00:00:00 2001 From: henning <> Date: Thu, 11 Aug 2005 16:21:52 +0000 Subject: [PATCH] check for EINTR too after writev(), pt out by Alexander Farber --- src/usr.sbin/ntpd/buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/usr.sbin/ntpd/buffer.c b/src/usr.sbin/ntpd/buffer.c index de630717..173bad3b 100644 --- a/src/usr.sbin/ntpd/buffer.c +++ b/src/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 @@ -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);