a problem I've been having.
Sergey Okhapkin
sos@prospect.com.ru
Thu Jul 10 01:16:00 GMT 1997
Colten Edwards wrote:
> connects. Unfortunately what's happening is the thread runs, and then
> exits the entire client. Here's the code that I'm using to create the
> thread and the thread itself.
Client crashes after ~60 connections? There was a bug in B18 accept code. And I see the bug in your code, whose crashed the accept.
> if ((identd_socket_write = accept(identd_socket_read, (struct sockaddr *) &remaddr, &sra)) > -1)
> {
> FD_ZERO(&identd);
> FD_SET(identd_socket_write, &identd);
> switch(select(identd_socket_write+1, &identd, NULL, NULL, NULL))
> {
> default:
skipped.
> case -1:
> close(identd_socket_write);
Remove close().
> identd_socket_write = -1;
> case 0:
> break;
> }
Place close() here.
> }
> sleep(1);
The code _must_ work now stable. You have to close accepted socket before the new accept.
>
> 4. The console code basically needs tobe re-written from scratch. I
> bypassed it entirely when I found it would not do some of the things I
> needed it todo. ie handle ansi color properly, cursor movement, clear
> screen etc. I do realize that the NT console is limited in some respects
> to what it can do, but it isn't that limited.
Use cygwin's console output instead of direct win32 console output calls.
--
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia
Looking for a job
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
More information about the Cygwin
mailing list