monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] hang on Win32/MinGW with sync file:


From: Matthew Gregan
Subject: Re: [Monotone-devel] hang on Win32/MinGW with sync file:
Date: Wed, 5 Dec 2007 12:29:14 +1300
User-agent: Mutt/1.5.17 (2007-11-01)

At 2007-12-04T15:18:18-0800, Zack Weinberg wrote:
> On Dec 4, 2007 12:11 PM, Matthew Gregan <address@hidden> wrote:
> > Right, that code is an implementation of socketpair() for Windows because it
> > is not provided by the Windows socket API.  Cross platform refers to the
> > rest of the code--all platforms can use socketpair() and almost all of the
> > rest of the code can be shared between platforms (except for process
> > creation, but we probably already have sufficient wrappers for these in the
> > $platform/ directories already).
> 
> There is one wrinkle - if I understand that code correctly, it's
> necessary to call closesocket() instead of close() on the fds returned
> from that socketpair implementation.  I guess we could just #define
> closesocket(n) close(n) on Unix...

Yeah, true.  The problem is that there is no close() on Windows (there's
_close() for CRT file descriptors, closesocket() for WinSock sockets, and
CloseHandle() for most other things).  It shouldn't be a big deal to
abstract away--either with a #define or by adding a closesocket() into our
platform code.

Cheers,
-mjg
-- 
Matthew Gregan                     |/
                                  /|                    address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]