This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]