Mail Archives: cygwin/1998/10/11/12:23:03
On Fri, 9 Oct 1998, Todd M. Grimm wrote:
> On Wed, 7 Oct 1998, Todd M. Grimm wrote:
> > I am using select() to test whether there are bytes on a socket to read
> > without blocking my program to check on this.
> >
> > The problem is that even when there is no data it returns a 1 to say that
> > there is data. This causes my program to try a read which blocks because
> > there really is no data.
> >
> > I saw several messages in the archives of this list about this, but all I
> > could find were questions. No one ever seemed to answer the question.
> >
> > Please let me know if you know how to get select() to work right or if
> > there is a nother way to test for bytes without blocking.
>
> Thanks to Harry and Michael for their responses. Above is my original
> notes. I am still having problems.
>
> I have isolated two small .C files that demonstrate what I am doing (wrong).
>
> I am hopeful that they will help one of you to spot my problem or confirm
> that you have the same problem.
>
> I am running on Windows NT 4.0 using B19 of the Cygwin g++. I am using
> version 19.1 of the dll file. 19.0 and 19.4 have the same problem. With
> 19.4 my bash shell failed to read .bashrc so I gave up on that.
>
> So, attached is the code. The first file describes how to run it. There are
> compile statements in their respective files.
>
> Thanks a bunch (I am really stuck),
> Todd
I'm having exactly the same trouble with the irc client I ported.. select
blocks, until a key is pressed, even if there is data available on the
socket. I mentioned this on the mailing list back when b18 came out, but
there wasn't a answer to my question.. There is nothing odd with what I'm
doing with select(), it's standard unix code that runs fine under alot of
varities of unix.
ftp.bitchx.com//pub/BitchX/clients/windows and get the .exe file there.
Run the program and make the window loose focus. It's now blocked in the
select call. and won't come back until a key is pressed while the window
has focus. This occurs in windows on the desktop and windows in the
background
Colten Edwards
panasync AT efnet
-
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 -