This is the mail archive of the 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]
Other format: [Raw text]

Re: _exit() missing WSACleanup() call?

On Mon, Aug 05, 2002 at 04:23:45PM +0200, Juergen Buchmueller wrote:
> every child that inherits a socket handle - but the CYGWIN libc 
> implementation does not seem to call WSACleanup() during the _exit() function 
> cleanup in that case?
> The effect is that after a few minutes, after maybe 100 child processes were 
> forked and exited again, Windows does something on a severity scale between 
> displaying message boxes about a lack of resources to hard lockups with 
> faults in 'kernel32.dll'. I'm lost.
> I tried to WSACleanup() in my user osd_exit() function to no avail. My best 
> guess is that there are other resources which I cannot give free this way?

When calling WSACleanup() in your application doesn't help, it's
somewhat likely that the problem is actually in your code.  What
is the parent process doing with the sockets?  Is it surely closing
and (perhaps) shutting them down properly?  Did you look for netstat

> The same project runs fine for days on various FreeBSD and GNU/Linux systems.

That's actually not good an example.  The socket implementation is
*waaayyyy* cleaner in BSD and Linux than is Winsock.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                      
Red Hat, Inc.

Unsubscribe info:
Bug reporting:

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