re: pthreads and sockets - Cannot register window class error

2004-05-05 Thread Arash Partow
Hi, I can't replicate your problem, but I know where it is coming from, basically standard windows winsock is not geared up to handle that man socket connections. When a socket is made and then closed the socket actually stays open for about 240-300 seconds depending on your registry settings, this

RE: pthreads and sockets - Cannot register window class error

2004-05-05 Thread Dave Korn
> -Original Message- > From: cygwin-owner On Behalf Of Arash Partow > Sent: 05 May 2004 12:04 > I can't replicate your problem, but I know where it is coming from, > basically standard windows winsock is not geared up to handle that man > socket connections. When a socket is made and then

Re: pthreads and sockets - Cannot register window class error

2004-05-05 Thread Brian Dessent
Jacek Trzmiel wrote: > void test() > { > /* go find out about the desired host machine */ > struct hostent *he = gethostbyname(HOST); > if (he == 0) { > perror("gethostbyname"); > exit(1); > } Just a wild guess, but gethostbyname() is probably not reentrant and can

Re: pthreads and sockets - Cannot register window class error

2004-05-05 Thread Reini Urban
Arash Partow schrieb: I can't replicate your problem, but I know where it is coming from, basically standard windows winsock is not geared up to handle that man socket connections. When a socket is made and then closed the socket actually stays open for about 240-300 seconds depending on your regis

Re: pthreads and sockets - Cannot register window class error

2004-05-05 Thread Jacek Trzmiel
Hi Brian, > > void test() > > { > > /* go find out about the desired host machine */ > > struct hostent *he = gethostbyname(HOST); > > if (he == 0) { > > perror("gethostbyname"); > > exit(1); > > } > > Just a wild guess, but gethostbyname() is probably not reentra

Re: pthreads and sockets - Cannot register window class error

2004-05-05 Thread Jacek Trzmiel
Hi Reini, > But we already found out that the culprit was Norton Firewall, closing > your socket, wasn't it? NIS is gone. Best regards, Jacek. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http:/

Re: pthreads and sockets - Cannot register window class error

2004-05-05 Thread Christopher Faylor
On Wed, May 05, 2004 at 05:38:35AM -0700, Brian Dessent wrote: >Jacek Trzmiel wrote: > >> void test() >> { >> /* go find out about the desired host machine */ >> struct hostent *he = gethostbyname(HOST); >> if (he == 0) { >> perror("gethostbyname"); >> exit(1); >> }

Re: pthreads and sockets - Cannot register window class error

2004-05-05 Thread Jacek Trzmiel
Hi, > I can't replicate your problem, but I know where it is coming from, > basically standard windows winsock is not geared up to handle that man > socket connections. When a socket is made and then closed the socket > actually stays open for about 240-300 seconds depending on your > registry se

Re: pthreads and sockets - Cannot register window class error

2004-05-05 Thread Jacek Trzmiel
> >> void test() > >> { > >> /* go find out about the desired host machine */ > >> struct hostent *he = gethostbyname(HOST); > >> if (he == 0) { > >> perror("gethostbyname"); > >> exit(1); > >> } > > > >Just a wild guess, but gethostbyname() is probably not reentran

Re: pthreads and sockets - Cannot register window class error

2004-05-05 Thread Steve Thompson
On Wed, 5 May 2004, Christopher Faylor wrote: > On Wed, May 05, 2004 at 05:38:35AM -0700, Brian Dessent wrote: > >Jacek Trzmiel wrote: > > > >> void test() > >> { > >> /* go find out about the desired host machine */ > >> struct hostent *he = gethostbyname(HOST); > >> if (he == 0) { >

RE: pthreads and sockets - Cannot register window class error

2004-05-05 Thread Hannu E K Nevalainen
> From: Christopher Faylor > Sent: Wednesday, May 05, 2004 11:04 PM > On Wed, May 05, 2004 at 05:38:35AM -0700, Brian Dessent wrote: > >Jacek Trzmiel wrote: > > > >> void test() > >> { > >> /* go find out about the desired host machine */ > >> struct hostent *he = gethostbyname(HOST); > >>

Re: pthreads and sockets - Cannot register window class error

2004-05-05 Thread Brian Ford
On Thu, 6 May 2004, Jacek Trzmiel wrote: > > $ g++ GetHostByNameTest.cpp -lpthread -o GetHostByNameTest.exe && > > ./GetHostByNameTest.exe gethostbyname: Operation not permitted > > Win2k SP4 + hotfixes. > Can someone reproduce it? Sure looks alot like this: http://www.cygwin.com/ml/cygwin/2004-

Re: pthreads and sockets - Cannot register window class error

2004-05-05 Thread Brian Ford
On Wed, 5 May 2004, Steve Thompson wrote: > On Wed, 5 May 2004, Christopher Faylor wrote: > > > Unless HOST is a numeric IP address, gethostbyname should be properly > > reentrant. The only time gethostbyname is not thread safe is when it is > > resolving a numeric IP. > > I believe that gethostb

RE: pthreads and sockets - Cannot register window class error

2004-05-05 Thread Hannu E K Nevalainen
> From: Brian Ford > Sent: Thursday, May 06, 2004 1:55 AM > On Thu, 6 May 2004, Jacek Trzmiel wrote: > > > > $ g++ GetHostByNameTest.cpp -lpthread -o GetHostByNameTest.exe && > > > ./GetHostByNameTest.exe gethostbyname: Operation not permitted > > > > Win2k SP4 + hotfixes. > > Can someone reproduc

Re: pthreads and sockets - Cannot register window class error

2004-05-05 Thread Steve Thompson
On Wed, 5 May 2004, Brian Ford wrote: > On Wed, 5 May 2004, Steve Thompson wrote: > > > On Wed, 5 May 2004, Christopher Faylor wrote: > > > > > Unless HOST is a numeric IP address, gethostbyname should be properly > > > reentrant. The only time gethostbyname is not thread safe is when it is > > >

Re: pthreads and sockets - Cannot register window class error

2004-05-05 Thread Jacek Trzmiel
Hi Brian, > > > $ g++ GetHostByNameTest.cpp -lpthread -o GetHostByNameTest.exe && > > > ./GetHostByNameTest.exe gethostbyname: Operation not permitted > > > > Win2k SP4 + hotfixes. > > Can someone reproduce it? > > Sure looks alot like this: > http://www.cygwin.com/ml/cygwin/2004-04/msg00545.htm

Re: pthreads and sockets - Cannot register window class error

2004-05-05 Thread Christopher Faylor
On Wed, May 05, 2004 at 07:01:01PM -0500, Brian Ford wrote: >On Wed, 5 May 2004, Steve Thompson wrote: >> On Wed, 5 May 2004, Christopher Faylor wrote: >>>Unless HOST is a numeric IP address, gethostbyname should be properly >>>reentrant. The only time gethostbyname is not thread safe is when it >

Re: pthreads and sockets - Cannot register window class error

2004-05-06 Thread Corinna Vinschen
On May 6 01:47, Hannu E K Nevalainen wrote: > > >Just a wild guess, but gethostbyname() is probably not reentrant and > > >can't be called from threads like that. > > > > Unless HOST is a numeric IP address, gethostbyname should be properly > > reentrant. The only time gethostbyname is not thread

Re: pthreads and sockets - Cannot register window class error

2004-05-06 Thread Brian Ford
On Thu, 6 May 2004, Jacek Trzmiel wrote: > Nevertheless ThreadingTest.cpp posted here: > > http://cygwin.com/ml/cygwin/2004-05/msg00178.html > > still sometimes fails, even with 20040504 snapshot: > > > $ g++ ThreadingTest.cpp -lpthread -o ThreadingTest.exe && ./ThreadingTest.exe > > 238 [win]

Re: pthreads and sockets - Cannot register window class error

2004-05-06 Thread Christopher Faylor
On Thu, May 06, 2004 at 11:13:43AM -0500, Brian Ford wrote: >On Thu, 6 May 2004, Jacek Trzmiel wrote: > >> Nevertheless ThreadingTest.cpp posted here: >> >> http://cygwin.com/ml/cygwin/2004-05/msg00178.html >> >> still sometimes fails, even with 20040504 snapshot: >> >> > $ g++ ThreadingTest.cpp -l

RE: pthreads and sockets - Cannot register window class error

2004-05-06 Thread Hannu E K Nevalainen
> From: Corinna Vinschen > Sent: Thursday, May 06, 2004 9:59 AM > On May 6 01:47, Hannu E K Nevalainen wrote: > > > >Just a wild guess, but gethostbyname() is probably not reentrant and > > > >can't be called from threads like that. > > > > > > Unless HOST is a numeric IP address, gethostbyname s