delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/08/05/10:47:41

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: pullmoll AT t-online DOT de (Juergen Buchmueller)
Reply-To: juergen AT pullmoll DOT de
To: cygwin AT cygwin DOT com
Subject: _exit() missing WSACleanup() call?
Date: Mon, 5 Aug 2002 16:23:45 +0200
User-Agent: KMail/1.4.2
MIME-Version: 1.0
Message-Id: <200208051623.58635.juergen@pullmoll.de>
X-Sender: 320028791064-0001 AT t-dialin DOT net

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi developers,

I have serious trouble with a project which I'm trying to port to CYGWIN. This 
project makes heavy use of fork() (actually fork2() to detach from the init 
process) and child processes' file handles are almost always sockets.

Now I read that CYGWIN handles this case by silentrly calling WSAStartup() for 
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?

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

I also tried to find something related in the cygwin DLL source code and only 
saw that there is no obvious WSACleanup() call somewhere.

Ciao,
Juergen Buchmueller
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE9Top6tCKWJo++MqgRApFuAKDAHb6+aEEfDLQEXBKchOLqgOGhkwCgrFn4
/9hj9/VNAystfs2lrqscJIM=
=6aFc
-----END PGP SIGNATURE-----


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019