This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: a problem I've been having.




On Thu, 10 Jul 1997, Sergey Okhapkin wrote:

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

Actually no. after the first connection it ends. it's not a crash. it
quits the client entirely. no exception. but there is a return code of
0x3ffffffff or something.. I'd have to check for sure.

> 
> > 		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);

hmm guess I'll have to loop because of the case 0: where we have a connect
but nothing has been sent yet. Don't wanna close in that case.


> 
> The code _must_ work now stable. You have to close accepted socket before the 
> new accept.

Understood.

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

why? the console output from cygwin can't do half of what I need todo and
basically adds yet another layer to what I need done. I found that when I
did use cygwin's console, things were very very slow and jerky. Now at
least we have some semblance of speed with the output (oh where are the
direct video memory accesses :))

						Colten Edwards

btw. getsockname() is broke.



-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]