diff options
author | djm <djm> | 2008-07-04 23:36:58 +0000 |
---|---|---|
committer | djm <djm> | 2008-07-04 23:36:58 +0000 |
commit | 67d7c8371527b30f489e94bf8e2ee4b5e5f7e684 (patch) | |
tree | 2d62e04a25469279dd9ce121cfbbb596689334c8 /atomicio.c | |
parent | f5dcebba06546e161907191dea045b1904ee90cb (diff) | |
download | openssh-67d7c8371527b30f489e94bf8e2ee4b5e5f7e684.tar.gz |
- (djm) [atomicio.c configure.ac] Disable poll() fallback in atomiciov for
Tru64. readv doesn't seem to be a comparable object there.
bz#1386, patch from dtucker@ ok me
Diffstat (limited to 'atomicio.c')
-rw-r--r-- | atomicio.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -97,8 +97,10 @@ atomiciov(ssize_t (*f) (int, const struct iovec *, int), int fd, /* Make a copy of the iov array because we may modify it below */ memcpy(iov, _iov, iovcnt * sizeof(*_iov)); +#ifndef BROKEN_READV_COMPARISON pfd.fd = fd; pfd.events = f == readv ? POLLIN : POLLOUT; +#endif for (; iovcnt > 0 && iov[0].iov_len > 0;) { res = (f) (fd, iov, iovcnt); switch (res) { @@ -106,7 +108,9 @@ atomiciov(ssize_t (*f) (int, const struct iovec *, int), int fd, if (errno == EINTR) continue; if (errno == EAGAIN || errno == EWOULDBLOCK) { +#ifndef BROKEN_READV_COMPARISON (void)poll(&pfd, 1, -1); +#endif continue; } return 0; |