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: Zack Weinberg
Subject: Re: [Monotone-devel] hang on Win32/MinGW with sync file:
Date: Tue, 4 Dec 2007 15:18:18 -0800

On Dec 4, 2007 12:11 PM, Matthew Gregan <address@hidden> wrote:
> > Note that dumb_socketpair is _not_ actually cross-platform; it has the
> > same #ifdef WIN32 style that netxx_pipe.cc currently has, and the WIN32
> > version has an extra parameter that is important. Apparently 'socketpair'
> > is implemented on some/most "unix" platforms, but not on Win32?
>
> 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...

zw




reply via email to

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