Mail Archives: djgpp/1997/08/17/12:35:13
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 -