delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/17/12:35:13

Date: Sun, 17 Aug 1997 19:28:44 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Samuel Slutzky <tayx AT expert DOT cc DOT purdue DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: Need help using select() under Win95
In-Reply-To: <5slbdh$t9e@mozo.cc.purdue.edu>
Message-ID: <Pine.SUN.3.91.970817192819.14271Q-100000@is>
MIME-Version: 1.0

On 10 Aug 1997, Samuel Slutzky wrote:

>    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.

If you mean by this that `select' returns as soon as you press the
first key, without waiting for you to press [Enter], then this is the
expected behavior.  `select' is a kind of `kbhit', only more portable
to the Unix world.

> 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.

Can you please write a short program that exhibits this behavior, then
post its code here?

- Raw text -


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