delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/16/01:50:54

From: blade DOT runner DOT shoots AT another DOT spam DOT bot (Alfons Hoogervorst)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Need help using select() under Win95
Date: Tue, 12 Aug 1997 16:18:53 GMT
Organization: The Programming with Puns Facility
Message-ID: <33f08c11.1638801@news3.worldaccess.nl>
References: <5slbdh$t9e AT mozo DOT cc DOT purdue DOT edu>
NNTP-Posting-Host: 193.67.132.220
Lines: 33
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Lo tayx AT expert DOT cc DOT purdue DOT edu (Samuel Slutzky):

Samuel, amazingly most Windows programmers think of select() as a
phoney function. It's a quite useful function, *IF* correctly
implemented. That's your problem.

Under Windows the select() is part of the WinSock API, which more or
less mimics Berkeley sockets. However, WinSock's  select() works on
socket "handles" only. If you want to handle keyboard input under
Win95 (Win32) you have to do something else.

Bye.

>   Hello, I am having a problem using select() under Win95.  I am trying 
>to port a program from Linux which needs to poll for input while doing 
>more important things.  It works, more or less, under Windows 95 when run 
>by itself except that it stops right away upon input and not after a 
>new-line, but this is Ok.  The bigger problem is that when run from 
>another program, that starts my program as a child process (I believe), 
>my program cannot detect any input at all using select() and therefore 
>just sits forever.  Does this make any sense?  Do I need to try the 
>Cygnus compiler I am hearing about and if so, will it compile anything 
>GCC/G++(Gxx) compile?
>
>  Thank you,
>
>    Sam Slutzky


+- Conceived through intercalation and juxtaposition -+
|  systems programmer / word player avant la lettre   |
|            proteus * worldaccess + nl               |
+-----------------------------------------------------+

- Raw text -


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