Browse Source

check for EINTR too after writev(), pt out by Alexander Farber

OPENBSD_3_8
henning 19 years ago
parent
commit
3b0d5b83e8
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/usr.sbin/ntpd/buffer.c

+ 2
- 2
src/usr.sbin/ntpd/buffer.c View File

@ -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> * 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 ((n = writev(msgbuf->fd, iov, i)) == -1) {
if (errno == EAGAIN) /* cannot write immediately */
if (errno == EAGAIN || errno == EINTR) /* try again later */
return (0); return (0);
else else
return (-1); return (-1);


Loading…
Cancel
Save