Description of problem:
The select() system call takes twice as long to timeout as it should.
Version-Release number of selected component (if applicable):
CentOS 5.5 (regression; CentOS 5.4 is fine)
Steps to Reproduce:
1. cat > select.delay.c << EOF
/* Tiny program to show CentOS 5.5 bug. Public domain */
struct timeval tv;
tv.tv_sec = 1;
tv.tv_usec = 0;
2. cc -o select.delay select.delay.c
3. time ./select.delay
Numbers along these lines:
Numbers like this:
This is a bug because the POSIX specification for "select()" at http://www.opengroup.org/onlinepubs/000095399/functions/select.html states that "the timeout period is given in seconds and microseconds" and the POSIX specification for "time.h" at http://www.opengroup.org/onlinepubs/009695399/basedefs/time.h.html points out the tv_sec is seconds, e.g. "time_t tv_sec Seconds".
Originally submitted at http://bugs.centos.org/view.php?id=4465 and instructed to go upstream. So, here I am.
Upstream means going to the linux-kernel mailing list - Red Hat is not
upstream for this.
Please try the mailing list.
For what it is worth, this bug has been fixed in CentOS 5.9.
Closing as "works for me"