For infinite timeouts, set both the tv_sec and tv_usec fields to zero in
poll() and select(). Noticed by: Wesley Morgan <morganw@chemicals.tacorp.com>
This commit is contained in:
parent
051fbf7d66
commit
9c386f6b7d
@ -694,8 +694,10 @@ select(p, uap)
|
|||||||
}
|
}
|
||||||
getmicrouptime(&rtv);
|
getmicrouptime(&rtv);
|
||||||
timevaladd(&atv, &rtv);
|
timevaladd(&atv, &rtv);
|
||||||
} else
|
} else {
|
||||||
atv.tv_sec = 0;
|
atv.tv_sec = 0;
|
||||||
|
atv.tv_usec = 0;
|
||||||
|
}
|
||||||
timo = 0;
|
timo = 0;
|
||||||
retry:
|
retry:
|
||||||
ncoll = nselcoll;
|
ncoll = nselcoll;
|
||||||
@ -827,8 +829,10 @@ poll(p, uap)
|
|||||||
}
|
}
|
||||||
getmicrouptime(&rtv);
|
getmicrouptime(&rtv);
|
||||||
timevaladd(&atv, &rtv);
|
timevaladd(&atv, &rtv);
|
||||||
} else
|
} else {
|
||||||
atv.tv_sec = 0;
|
atv.tv_sec = 0;
|
||||||
|
atv.tv_usec = 0;
|
||||||
|
}
|
||||||
timo = 0;
|
timo = 0;
|
||||||
retry:
|
retry:
|
||||||
ncoll = nselcoll;
|
ncoll = nselcoll;
|
||||||
|
Loading…
Reference in New Issue
Block a user