[Spread-users] Monitor on Win32?

Tim Peters tim at zope.com
Tue Jan 8 15:41:09 EST 2002

[Mike Stagnaro mstagnaro at hotmail.com
 Wed, 12 Dec 2001 11:38:48 -0700]
> ...
> I'm running on Win2K, SP2 using Visual Studio 6, SP 5.
> ...
> Another side question....
> I don't see any calls to "WSACleanup()" in the source distribution.
> Does this lead to any strange behaviour on Win32 platforms, or does
> socket closure and/or process death do enough to release resources
> from Winsock (I usually call it to insure the ref counter stays
> consistent)?

More problematic is that there are no calls to closesocket() -- close()
doesn't work on sockets in Windows, so Spread never actually closes a socket
on Windows except via process death.  This can eventually cause "mysterious
problems" in both the daemon and client, as internal socket resources are

A one-second hack that rendered Spread rock-solid (even on Win98) for me was

#define close closesocket

to arch.h under the ARCH_PC_WIN95 branch.

A subtler problem is that socket error info isn't communicated via errno
under Windows, and WSAGetLastError/GetLastError aren't called either.  But I
haven't seen any problems I could pin on that.

More information about the Spread-users mailing list