A new attempt on WSACleanup

Sebastian Lackner sebastian at fds-team.de
Tue Nov 24 12:20:38 CST 2015

On 24.11.2015 19:07, Bruno Jesus wrote:
> After some time struggling with the server I finally managed to
> produce a working version of the idea of bringing all sockets from
> server to winsock and then closing all of them. Tested with 1026
> sockets and seems to work as expected by bringing 128 sockets per
> request from the server.
> This is certainly too much for code freeze but I plan to send after
> it, feedback is very much welcome since mistakes are always possible
> when working after midnight.
> Best wishes,
> Bruno

I'm not sure, but probably the following, slightly modified idea would
be preferred. On Windows there is also a way to enumerate all handles:
SystemHandleInformation. I have already started writing patches for this:


If tests confirm that WSACleanup really closes all sockets, including
those created with DuplicateHandle(), then we could use this ntdll API
to enumerate them. Even if we decide not to use the ntdll API, we could
at least use one shared wineserver call for both.

Nevertheless, similar to your approach, I do not see any chance to get
this upstream now during the feature freeze. Applications might start
using it, and then fail if something doesn't work as expected - so its
better to wait. ;)


More information about the wine-devel mailing list