This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
RE: a problem I've been having.
- To: Cygnus Gcc tools <gnu-win32 at cygnus dot com>, "'edwac at sk dot sympatic dot ca'" <edwac at sk dot sympatic dot ca>
- Subject: RE: a problem I've been having.
- From: Sergey Okhapkin <sos at prospect dot com dot ru>
- Date: Thu, 10 Jul 1997 12:04:00 +0400
- Encoding: 42 TEXT
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".