Fix pthread's empth_select() not to change the timeout
Commit 08b94556
introduced the timeout parameter. The empthread
implementation could change it, at least on some systems, and its user
worked around a possible change. However, that behavior was not
documented, and it's inconvenient. Fix the pthread implementation,
and remove the workaround.
This commit is contained in:
parent
6564ff2240
commit
6144a363d6
2 changed files with 8 additions and 4 deletions
|
@ -121,7 +121,6 @@ io_input(struct iop *iop, int waitforinput)
|
|||
char buf[IO_BUFSIZE];
|
||||
int cc;
|
||||
int res;
|
||||
struct timeval timeout = iop->input_timeout;
|
||||
|
||||
/* Not a read IOP */
|
||||
if ((iop->flags & IO_READ) == 0) {
|
||||
|
@ -135,7 +134,7 @@ io_input(struct iop *iop, int waitforinput)
|
|||
}
|
||||
/* Wait for the file to have input. */
|
||||
if (waitforinput) {
|
||||
res = empth_select(iop->fd, EMPTH_FD_READ, &timeout);
|
||||
res = empth_select(iop->fd, EMPTH_FD_READ, &iop->input_timeout);
|
||||
if (res < 0) {
|
||||
iop->flags |= IO_ERROR;
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue