This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Bug: select() does not modify timeout (arg 5) on return
- From: Javier <gweobia at yahoo dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 10 Feb 2010 14:29:23 -0800 (PST)
- Subject: Bug: select() does not modify timeout (arg 5) on return
select() call with specified timeout in argument 5 is not altered on return when time is up.
on windows code below returns: should be 0.0 but we have: 5.0
on linux code below returns: should be 0.0 but we have: 0.0
uname -a:
CYGWIN_NT-5.1 computer 1.7.1(0.218/5/3) 2009-12-07 11:48 i686 Cygwin
-----
#include <stdio.h>
#include <sys/select.h>
int main()
{
struct timeval tm;
tm.tv_sec = 5;
tm.tv_usec = 0;
select(1, NULL, NULL, NULL, &tm);
printf("should be 0.0 but we have: %ld.%ld\n", tm.tv_sec, tm.tv_usec);
}
-----
Javier
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple