www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/10/09/17:05:29

From: weng AT tp-cad DOT com (Matthias Weng)
Subject: RE:select() returns 0 (NT4.0)
9 Oct 1998 17:05:29 -0700 :
Message-ID: <361E11CE.DFF12E0C.cygnus.gnu-win32@tp-cad.com>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

Hi there,
the problem isn't a bug, its a mistake in the select call. All the worry
was caused by a wrong value for the size of the bitfield. The call must
contain the number of bits to examine and not the size of (sizeof()) the
structure. I'm sorry for blaming B19 for my own fault.

wrong :
res = select(sizeof(fd_var), &fd_read, &fd_write, &fd_except,
&nulltime);

right :
res = select(sizeof(fd_var) *8, &fd_read, &fd_write, &fd_except,
&nulltime);                     ^^^

Thanks for all the folks who invested some thoughts or some time in this
problem

--Matthias Weng

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019