|
Lines 101-108
Link Here
|
| 101 |
/* Make a copy of the iov array because we may modify it below */ |
101 |
/* Make a copy of the iov array because we may modify it below */ |
| 102 |
memcpy(iov, _iov, iovcnt * sizeof(*_iov)); |
102 |
memcpy(iov, _iov, iovcnt * sizeof(*_iov)); |
| 103 |
|
103 |
|
|
|
104 |
#if 0 |
| 104 |
pfd.fd = fd; |
105 |
pfd.fd = fd; |
| 105 |
pfd.events = f == readv ? POLLIN : POLLOUT; |
106 |
pfd.events = f == readv ? POLLIN : POLLOUT; |
|
|
107 |
#endif |
| 106 |
for (; iovcnt > 0 && iov[0].iov_len > 0;) { |
108 |
for (; iovcnt > 0 && iov[0].iov_len > 0;) { |
| 107 |
res = (f) (fd, iov, iovcnt); |
109 |
res = (f) (fd, iov, iovcnt); |
| 108 |
switch (res) { |
110 |
switch (res) { |
|
Lines 114-120
Link Here
|
| 114 |
#else |
116 |
#else |
| 115 |
if (errno == EAGAIN) { |
117 |
if (errno == EAGAIN) { |
| 116 |
#endif |
118 |
#endif |
|
|
119 |
#if 0 |
| 117 |
(void)poll(&pfd, 1, -1); |
120 |
(void)poll(&pfd, 1, -1); |
|
|
121 |
#endif |
| 118 |
continue; |
122 |
continue; |
| 119 |
} |
123 |
} |
| 120 |
return 0; |
124 |
return 0; |