Hi
I found select's timeout doesn't work correctly on EC2. This problem is reproduced by following way.
1. Create an EC2 instance using 118940168514/FreeBSD/EC2 8.3-RELEASE amd64/HVM(AMI-6c1dac6d).
2. Run following commands on the instance.
How can I fix this problem?
Thanks
I found select's timeout doesn't work correctly on EC2. This problem is reproduced by following way.
1. Create an EC2 instance using 118940168514/FreeBSD/EC2 8.3-RELEASE amd64/HVM(AMI-6c1dac6d).
2. Run following commands on the instance.
$ vi testselect.c
Code:
#include <stdio.h>
#include <sys/select.h>
int main(){
struct timeval t;
t.tv_sec = 5;
t.tv_usec = 0;
select(0, NULL, NULL, NULL, &t);
return 0;
}
Code:
$ gcc testselect.c
$ time ./a.out
8.61 real 0.00 user 0.00 sys
Thanks
